Skip to content

Commit 8c06573

Browse files
store objective in cache
1 parent 1548879 commit 8c06573

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

kernel_tuner/util.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,7 @@ def process_cache(cache, kernel_options, tuning_options, runner):
758758
c["problem_size"] = kernel_options.problem_size if not callable(kernel_options.problem_size) else "callable"
759759
c["tune_params_keys"] = list(tuning_options.tune_params.keys())
760760
c["tune_params"] = tuning_options.tune_params
761+
c["objective"] = tuning_options.objective
761762
c["cache"] = {}
762763

763764
contents = json.dumps(c, cls=NpEncoder, indent="")[:-3] # except the last "}\n}"

test/test_util_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ def assert_open_cachefile_is_correctly_parsed(cache):
550550
delete_temp_file(cache)
551551

552552
kernel_options = Options(kernel_name="test_kernel", problem_size=(1, 2))
553-
tuning_options = Options(cache=cache, tune_params=Options(x=[1, 2, 3, 4]), simulation_mode=False)
553+
tuning_options = Options(cache=cache, tune_params=Options(x=[1, 2, 3, 4]), simulation_mode=False, objective="time")
554554
runner = Options(dev=Options(name="test_device"), simulation_mode=False)
555555

556556
try:

0 commit comments

Comments
 (0)