Skip to content

Commit f671c0e

Browse files
committed
Fix to add neighbor method as argument
1 parent 623eca4 commit f671c0e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel_tuner/searchspace.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ def __get_random_neighbor_hamming(self, param_config: tuple) -> tuple:
839839
for i in random_order_indices:
840840
# assert arr[i].shape == target.shape, f"Row {i} shape {arr[i].shape} does not match target shape {target.shape}"
841841
if np.count_nonzero(arr[i] != target) == 1:
842-
self.__add_to_neighbor_partial_cache(param_config, [i], full_neighbors=False)
842+
self.__add_to_neighbor_partial_cache(param_config, [i], "Hamming", full_neighbors=False)
843843
return self.get_param_configs_at_indices([i])[0]
844844
return None
845845

@@ -879,7 +879,7 @@ def __get_random_neighbor_adjacent(self, param_config: tuple) -> tuple:
879879

880880
# if there are matching indices, return a random one
881881
if len(matching_indices) > 0:
882-
self.__add_to_neighbor_partial_cache(param_config, matching_indices, full_neighbors=allowed_index_difference == max_index_difference)
882+
self.__add_to_neighbor_partial_cache(param_config, matching_indices, "adjacent", full_neighbors=allowed_index_difference == max_index_difference)
883883

884884
# get a random index from the matching indices
885885
random_neighbor_index = choice(matching_indices)

0 commit comments

Comments
 (0)