helion.Settings

class helion.Settings(**settings)[source]

Settings can be passed to hl.kernel as kwargs and control the behavior of the compilation process. Unlike a Config, settings are not auto-tuned and set by the user.

Parameters:

settings (object)

__init__(**settings)[source]

Initialize the Settings object with the provided dictionary of settings. If no settings are provided, the default settings are used (see set_default_settings).

Parameters:

settings (object) – Keyword arguments representing various settings.

Methods

__init__(**settings)

Initialize the Settings object with the provided dictionary of settings.

check_autotuning_disabled()

default()

Get the default Settings object.

to_dict()

Convert the Settings object to a dictionary.

Attributes

ignore_warnings

Subtypes of exc.BaseWarning to ignore when compiling.

index_dtype

The dtype to use for index variables.

dot_precision

Precision for dot products, see triton.language.dot.

static_shapes

If True, use static shapes for all tensors.

use_default_config

For development only, skips all autotuning and uses the default config (which may be slow).

autotune_log_level

Log level for autotuning using Python logging levels.

autotune_compile_timeout

Timeout for Triton compilation in seconds used for autotuning.

autotune_precompile

If True, precompile the kernel before autotuning.

print_output_code

If True, print the output code of the kernel to stderr.

force_autotune

If True, force autotuning even if a config is provided.

allow_warp_specialize

If True, allow warp specialization for tl.range calls on CUDA devices.

__init__(**settings)[source]

Initialize the Settings object with the provided dictionary of settings. If no settings are provided, the default settings are used (see set_default_settings).

Parameters:

settings (object) – Keyword arguments representing various settings.

to_dict()[source]

Convert the Settings object to a dictionary.

Returns:

A dictionary representation of the Settings object.

Return type:

dict[str, object]

check_autotuning_disabled()[source]
Return type:

None

static default()[source]

Get the default Settings object. If no default settings are set, create a new one.

Returns:

The default Settings object.

Return type:

Settings

ignore_warnings: list[type[BaseWarning]]

Subtypes of exc.BaseWarning to ignore when compiling.

index_dtype: dtype

The dtype to use for index variables. Default is torch.int32.

dot_precision: Literal['tf32', 'tf32x3', 'ieee']

Precision for dot products, see triton.language.dot. Can be ‘tf32’, ‘tf32x3’, or ‘ieee’.

static_shapes: bool

If True, use static shapes for all tensors. This is a performance optimization.

use_default_config: bool

For development only, skips all autotuning and uses the default config (which may be slow).

autotune_log_level: int

Log level for autotuning using Python logging levels. Default is logging.INFO. Use 0 to disable all output.

autotune_compile_timeout: int

Timeout for Triton compilation in seconds used for autotuning. Default is 60 seconds.

autotune_precompile: bool

If True, precompile the kernel before autotuning. Requires fork-safe environment.

print_output_code: bool

If True, print the output code of the kernel to stderr.

force_autotune: bool

If True, force autotuning even if a config is provided.

allow_warp_specialize: bool

If True, allow warp specialization for tl.range calls on CUDA devices.