@@ -28,16 +28,24 @@ the ``strategy=`` optional argument of ``tune_kernel()``. Kernel Tuner currently
2828
2929Most strategies have some mechanism built in to detect when to stop tuning, which may be controlled through specific
3030parameters that can be passed to the strategies using the ``strategy_options= `` optional argument of ``tune_kernel() ``. You
31- can also override whatever internal stop criterion the strategy uses, and set either a time limit in seconds or a maximum
32- number of unique function evaluations.
31+ can also override whatever internal stop criterion the strategy uses, and set either a time limit in seconds (using ``time_limit= ``) or a maximum
32+ number of unique function evaluations (using ``max_fevals= ``).
33+
34+ To give an example, one could simply add these two arguments to any code calling ``tune_kernel() ``:
35+
36+ .. code-block :: python
37+
38+ results, env = tune_kernel(" vector_add" , kernel_string, size, args, tune_params, strategy = " random_sample" , strategy_options = dict (max_fevals = 5 ))
39+
3340
3441 A 'unique function evaluation' corresponds to the first time that Kernel Tuner tries to compile and benchmark a parameter
3542configuration that has been selected by the optimization strategy. If you are continuing from a previous tuning session using
36- cache files, serving a value from the cache also counts as a function evaluation for the strategy. Only unique function
37- evaluations are counted, so the second time a parameter configuration is selected by the strategy it is served from the
43+ cache files, serving a value from the cache for the first time in the run also counts as a function evaluation for the strategy.
44+ Only unique function evaluations are counted, so the second time a parameter configuration is selected by the strategy it is served from the
3845cache, but not counted as a unique function evaluation.
3946
40- The ``strategy_options= `` argument of ``tune_kernel() `` should be used as follows:
47+ Below all the strategies are listed with their strategy-specific options that can be passed in a dictionary to the ``strategy_options= `` argument
48+ of ``tune_kernel() ``.
4149
4250
4351kernel_tuner.strategies.basinhopping
0 commit comments