- inf
__init__(
call_compile: Callable[[Sequence[str], Mapping, str], NoneType],
call_running: Callable[[], float],
optimizers: Sequence[str],
parameters: Mapping[str, Tuple],
call_perf: Callable[[], Dict[str, Any]] = None,
workspace='yatuner.db',
log_level=10,
norm_range=None,
deterministic=False
) → None
A tuner.
Args:
call_compile
((Sequence[str], Mapping, str) -> None): A function runing compilation process.call_running
(() -> float): A function fetching result of target program.optimizers
(Sequence[str]): List of on/of options.parameters
(Mapping[str, Tuple]): List of parameters, in format ofparam: (min, max, default)
call_perf
(() -> Dict[str, Any], optional): Fectch feature of given program, used in linUCB. Defaults to None.workspace
(str, optional): Directory to store output files. Defaults to 'yatuner.db'.log_level
(optional): Log level. Defaults to logging.DEBUG.norm_range
(float, optional): Cut the data of test run to get more accurate result, None if doing a symmetrization. Defaults to None.deterministic
(bool): False if the result ofcall_compile
is random to a certain extent, otherwise True. Defaults to False.
hypotest_optimizers(
num_samples=10,
z_threshold=0.05,
t_threshold=0.05,
num_epochs=30
)
Hypothesis test for on/of options.
Args:
num_samples
(int, optional): Sampling times for each option. Defaults to 10.z_threshold
(float, optional): Z threshold. Defaults to 0.05.t_threshold
(float, optional): T threshold. Defaults to 0.05.num_epochs
(int, optional): optimization epoches after selection. Defaults to 30.
hypotest_parameters(num_samples=10, t_threshold=0.05)
Hypothesis test for parameters.
Args:
num_samples
(int, optional): Sampling times for each parameter. Defaults to 10.t_threshold
(float, optional): T threshold. Defaults to 0.05.
initialize()
optimize(num_samples=10, num_epochs=60) → None
Optimize selected parameters with bayesian.
optimize_linUCB(
alpha=0.5,
num_epochs=200,
num_samples=10,
num_bins=25,
nth_choice=3,
metric='cpu-cycles'
) → None
Optimize selected parameters with linUCB.
plot_data() → None
Plot result in violin graph.
run(num_samples=10)
Run result and existing options to compare.
Args:
num_samples
(int, optional): Sampling times. Defaults to 10.
test_run(num_samples=200, warmup=50)
Doing a test run with no options indicated.
Args:
num_samples
(int, optional): Times to run. Defaults to 200.warmup
(int, optional): Times to warmup. Defaults to 50.
This file was automatically generated via lazydocs.