helion.language.specialize

helion.language.specialize(value)[source]

Turn a dynamic shape into a compile-time constant. Example:

hl.specialize(tensor.size(1))

Parameters:

value (int | SymInt) – The symbolic value to specialize on.

Returns:

The specialized value.

Return type:

int

See also

  • ConstExpr: Create compile-time constants for kernel parameters