Skip to content

Commit

Permalink
Use the cleaning observer.
Browse files Browse the repository at this point in the history
  • Loading branch information
isazi committed Sep 17, 2024
1 parent e7fd411 commit 939f0c3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/directives/histogram_c_openacc.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ def get_results(self):
reference_hist = histogram(kernel_args["histogram"][0], reference_hist)
answer = [None, reference_hist]

mem_cleaner = MemoryReset([None, kernel_args["histogram"][1]])

tune_kernel(
"histogram",
kernel_string["histogram"],
Expand All @@ -80,6 +82,7 @@ def get_results(self):
tune_params,
metrics=metrics,
answer=answer,
observers=[mem_cleaner],
compiler="nvc++",
compiler_options=["-fast", "-acc=gpu"],
)

0 comments on commit 939f0c3

Please sign in to comment.