Traceback (most recent call last):
File "test.py", line 23, in <module>
strategy="bayes_opt",
File "/home/stijn/miniconda3/lib/python3.7/site-packages/kernel_tuner/interface.py", line 469, in tune_kernel
results, env = strategy.tune(runner, kernel_options, device_options, tuning_options)
File "/home/stijn/miniconda3/lib/python3.7/site-packages/kernel_tuner/strategies/bayes_opt.py", line 129, in tune
bo = BayesianOptimization(parameter_space, removed_tune_params, kernel_options, tuning_options, normalize_dict, denormalize_dict, runner)
File "/home/stijn/miniconda3/lib/python3.7/site-packages/kernel_tuner/strategies/bayes_opt.py", line 228, in __init__
self.initial_sample()
File "/home/stijn/miniconda3/lib/python3.7/site-packages/kernel_tuner/strategies/bayes_opt.py", line 439, in initial_sample
samples = self.draw_latin_hypercube_samples(self.num_initial_samples)
File "/home/stijn/miniconda3/lib/python3.7/site-packages/kernel_tuner/strategies/bayes_opt.py", line 424, in draw_latin_hypercube_samples
param_config = self.normalize_param_config(param_configs[i])
File "/home/stijn/miniconda3/lib/python3.7/site-packages/kernel_tuner/strategies/bayes_opt.py", line 338, in normalize_param_config
normalized = tuple(self.normalized_dict[self.param_names[index]][param_value] for index, param_value in enumerate(param_config))
File "/home/stijn/miniconda3/lib/python3.7/site-packages/kernel_tuner/strategies/bayes_opt.py", line 338, in <genexpr>
normalized = tuple(self.normalized_dict[self.param_names[index]][param_value] for index, param_value in enumerate(param_config))
KeyError: 9
The number given by KeyError is a random number between 1 and 64. My suspicion is that bayes_opt interprets block_size_x=[1, 64] as range(1, 64) for some reason. Adding more possible values for block_size_x fixes the issue (for example, block_size_x=[1, 64, 128]).
The following code throws an exception.
Results in the following error:
The number given by
KeyError
is a random number between 1 and 64. My suspicion is thatbayes_opt
interpretsblock_size_x=[1, 64]
asrange(1, 64)
for some reason. Adding more possible values forblock_size_x
fixes the issue (for example,block_size_x=[1, 64, 128]
).