Command-line options#
Primbench benchmarks accept command-line options that override the corresponding fields in the settings struct. When a value is set both programmatically through settings and on the command line, the command-line value takes precedence.
For details on setting values programmatically before parsing the command line, see Configure benchmark settings. For the settings struct and the rest of the benchmark API, see Primbench API.
Options reference#
Option |
Type / Default |
Description |
|---|---|---|
|
Flag |
Prints usage information and exits. |
|
|
Input array size in bytes. Must be greater than |
|
|
When set, cache clearing before kernel launches is skipped. Boolean options take no value. |
|
|
Seed used for input array generation. |
|
|
Output JSON file path. |
|
|
Output CSV file path. No CSV is written when empty. |
|
|
Regex filter applied to specialization names. Only matching specializations are benchmarked. |
|
|
Perform a dry run without executing kernels. Boolean options take no value. |
|
|
Minimum GPU time in milliseconds for each batch. Must be greater than |
|
|
Minimum total benchmark duration in seconds. Must be greater than |
|
|
Maximum duration in seconds before a noisy benchmark times out. Must be greater than |
|
|
Number of recent batches used in the noise-reduction sliding window. Must be greater than |
|
|
Noise tolerance percentage for early stopping. Must be greater than |
|
|
Minimum GPU temperature in degrees Celsius. Must be less than or equal to |
|
|
Maximum GPU temperature in degrees Celsius. If the GPU exceeds this temperature, Primbench waits for it to cool below this threshold before starting a specialization. |
|
|
Maximum time in seconds to spend warming the GPU. Must be greater than |
|
|
Maximum time in seconds to spend cooling the GPU. Must be greater than |
|
|
When set, per-batch details are included in the output. Boolean options take no value. |
|
|
Number of spaces per indentation level in JSON output. Must be less than or equal to |
|
|
Maximum duration in seconds before stream blocking times out. Must be greater than |
Size suffixes#
The --size option accepts an optional suffix to specify the unit:
KiB, kibibytes, 1024 bytesMiB, mebibytes, 1024 × 1024 bytesGiB, gibibytes, 1024 × 1024 × 1024 bytes
When no suffix is provided, the value is interpreted as raw bytes.
Programmatic defaults and CLI precedence#
Each option corresponds to a field in the settings struct. You can set default values programmatically before passing settings to the executor. Any value supplied on the command line overrides the programmatic default. See Configure benchmark settings for examples of combining programmatic and command line configuration.