API reference
python:irx:irx.builtins.collections.tensor
module tensor
irx.builtins.collections.tensor
Source: packages/irx/src/irx/builtins/collections/tensor.py:1
Tensor layout helpers layered on the builtin tensor runtime.
Define IRx's backend-neutral Tensor metadata helpers on top of the canonical buffer/view substrate and the Arrow C++ backed tensor runtime.
Classes
-
TensorLayout — Static Tensor layout metadata.
-
TensorOrder — Canonical contiguous layout order for Tensor helpers.
Functions
-
tensor_buffer_dtype — Return the canonical buffer dtype handle for one Tensor element.
-
tensor_buffer_view_metadata — Bridge one Tensor layout into canonical buffer/view metadata.
-
tensor_byte_bounds — Return the minimum and maximum element-start byte offsets.
-
tensor_default_strides — Return canonical byte strides for one contiguous Tensor shape.
-
tensor_element_count — Return the logical element count for one layout.
-
tensor_element_size_bytes — Return the byte width for one Tensor element type.
-
tensor_element_size_bytes_from_dtype — Return the byte width for one canonical primitive dtype handle.
-
tensor_is_c_contiguous — Return whether one layout matches canonical C-order strides.
-
tensor_is_f_contiguous — Return whether one layout matches canonical Fortran-order strides.
-
tensor_primitive_type_name — Return the builtin primitive storage name for one Tensor element.
-
validate_tensor_layout — Validate one static Tensor layout.