futhark autotune [options…] <program.fut>


futhark-autotune attemps to find optimal values for threshold parameters given representative datasets. This is done by repeatedly running running the program through futhark-bench with different values for the threshold parameters. When futhark-autotune finishes tuning a program foo.fut, the results are written to foo.fut.tuning, which will then automatically be picked up by subsequent uses of futhark-bench and futhark-test.

Currently, only the entry point named main is tuned.



The backend used when compiling Futhark programs (without leading futhark, e.g. just opencl).


The program used to perform operations (eg. compilation). Defaults to the binary running futhark autotune itself.


Pass an option to programs that are being run. For example, we might want to run OpenCL programs on a specific device:

futhark autotune prog.fut --backend=opencl --pass-option=-dHawaii

The number of runs per data set.

-v, --verbose

Print verbose information about what the tuner is doing. Pass multiple times to increase the amount of information printed.


Change the extension used for tuning files (.tuning by default).


Initial tuning timeout for each dataset in seconds. After running the intitial tuning run on each dataset, the timeout is based on the run time of that initial tuning. Defaults to 60.

A negative timeout means to wait indefinitely.