Skip to content

Commit 83d9993

Browse files
committed
specified cache argument for simulation
1 parent c77e1be commit 83d9993

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

examples/hip/vector_add_simulation_mode.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,12 @@ def tune():
3131
tune_params = OrderedDict()
3232
tune_params["block_size_x"] = [128+64*i for i in range(15)]
3333

34-
filename = "vector_add.json"
34+
filename = "vector_add_cache.json"
3535
if os.path.isfile(filename):
3636
results, env = tune_kernel("vector_add", kernel_string, size, args, tune_params,
37-
strategy="simulated_annealing",
37+
strategy="random_sample", strategy_options=dict(max_fevals=10),
3838
lang="HIP", simulation_mode=True, cache="vector_add_cache.json")
3939

40-
# Store the tuning results in an output file
41-
store_output_file("vector_add_simulated_annealing.json", results, tune_params)
42-
43-
return results
4440
else:
4541
print(f"{filename} does not exist in the directory, run vector_add.py first.")
4642

0 commit comments

Comments
 (0)