Skip to content

Commit e9797e2

Browse files
committed
Made Hypertuner backend compatible with changes to Backend ABC
1 parent 79fe080 commit e9797e2

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

kernel_tuner/backends/hypertuner.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,3 +168,7 @@ def memcpy_dtoh(self, dest, src):
168168

169169
def memcpy_htod(self, dest, src):
170170
return super().memcpy_htod(dest, src)
171+
172+
def refresh_memory(self, device_memory, host_arguments, should_sync):
173+
"""This is a no-op for the hypertuner backend, as it does not manage memory directly."""
174+
pass

kernel_tuner/hyper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def put_if_not_present(target_dict, key, value):
7272
put_if_not_present(kwargs, "verbose", True)
7373
put_if_not_present(kwargs, "quiet", False)
7474
put_if_not_present(kwargs, "simulation_mode", False)
75-
put_if_not_present(kwargs, "strategy", brute_force)
75+
put_if_not_present(kwargs, "strategy", 'brute_force')
7676
put_if_not_present(kwargs, 'verify', None)
7777
arguments = [target_strategy]
7878

test/test_hyper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ def test_hyper(env):
3434
}
3535
}
3636

37-
result, env = tune_hyper_params(target_strategy, hyper_params, iterations=1, compiler_options=compiler_options, verbose=True, cache=None)
37+
result, env = tune_hyper_params(target_strategy, hyper_params, restrictions=[], iterations=1, compiler_options=compiler_options, verbose=True, cache=None)
3838
assert len(result) == 2
3939
assert 'best_config' in env

0 commit comments

Comments
 (0)