Rate this Page

helion.language.specialize#

helion.language.specialize(value)[source]#

Turn dynamic shapes into compile-time constants. Examples:

channels = hl.specialize(tensor.size(1))
height, width = hl.specialize(tensor.shape[-2:])
Parameters:

value (TypeVar(_T)) – The symbolic value or sequence of symbolic values to specialize on.

Return type:

TypeVar(_T)

Returns:

A Python int or a sequence containing only Python ints.

See also

  • ConstExpr: Create compile-time constants for kernel parameters