Skip to content
heliaAOT
API Reference
HELIA HUB

AirStridedSliceOptions

Machine-readable model

class

Options for STRIDEDSLICE operator.

helia_aot/air/options.py:835

AirStridedSliceOptions()

Options for STRIDED_SLICE operator.

Provisional: importable, but outside the compatibility promise; a minor release can change or remove it.

attribute

begin

Python

helia_aot/air/options.py:851

begin: tuple[int, ...] = Field(..., description='Begin indices for each dimension')

Begin indices for the specified leading axes.

attribute

end

Python

helia_aot/air/options.py:852

end: tuple[int, ...] = Field(..., description='End indices for each dimension')

End indices for the specified leading axes.

attribute

stride

Python

helia_aot/air/options.py:853

stride: tuple[int, ...] = Field(..., description='Stride values for each dimension')

Strides for the specified leading axes.

attribute

offset

Python

helia_aot/air/options.py:860

offset: bool = Field(False, description='If True, apply offset to the begin and end indices')

If True, apply offset to the begin and end indices (default False).

method

Compute each axis's slice, then pad to the kernel's padto dimensions.

helia_aot/air/options.py:862

get_slices(input_shape: tuple[int, ...], pad_to: int = 4) -> list[AirStrideSlice]

Compute each axis’s slice, then pad to the kernel’s pad_to dimensions.

Missing trailing axes are taken whole, as in LiteRT. The parameter vectors must have equal lengths and cannot exceed the input rank.

Parameters of get_slices
NameTypeDefaultDescription
input_shapetuple[int, ...]RequiredThe shape of the input tensor.
pad_toint4The number of dimensions to pad the input shape to (default 4).
Returns of get_slices
TypeDescription
list[AirStrideSlice]A list of AirStrideSlice, each containing (begin, end, stride) for each axis.
Errors raised by get_slices
TypeDescription
UnsupportedModelErrorIf ``ellipsis_mask`` or ``new_axis_mask`` is set.
ConfigValueErrorIf the parameter vectors differ in length or exceed the input rank.