TensorMapDataType
struct TensorMapDataType
Data type enumeration for TMA tensor map descriptors.
Specifies the element data type for TMA operations. The TMA hardware supports various numeric types including integers, floating-point, and specialized formats.
Implemented traits
AnyType,
Copyable,
ImplicitlyCopyable,
ImplicitlyDestructible,
Movable,
RegisterPassable,
TrivialRegisterPassable
comptime members
BFLOAT16
comptime BFLOAT16 = TensorMapDataType(Int32(9))
Brain floating-point 16-bit format.
FLOAT16
comptime FLOAT16 = TensorMapDataType(Int32(6))
IEEE 754 16-bit floating-point.
FLOAT32
comptime FLOAT32 = TensorMapDataType(Int32(7))
IEEE 754 32-bit floating-point.
FLOAT32_FTZ
comptime FLOAT32_FTZ = TensorMapDataType(Int32(10))
32-bit float with flush-to-zero for denormals.
FLOAT64
comptime FLOAT64 = TensorMapDataType(Int32(8))
IEEE 754 64-bit floating-point.
INT32
comptime INT32 = TensorMapDataType(Int32(3))
Signed 32-bit integer.
INT64
comptime INT64 = TensorMapDataType(Int32(5))
Signed 64-bit integer.
TFLOAT32
comptime TFLOAT32 = TensorMapDataType(Int32(11))
TensorFloat-32 format.
TFLOAT32_FTZ
comptime TFLOAT32_FTZ = TensorMapDataType(Int32(12))
TensorFloat-32 with flush-to-zero for denormals.
UINT16
comptime UINT16 = TensorMapDataType(Int32(1))
Unsigned 16-bit integer.
UINT32
comptime UINT32 = TensorMapDataType(Int32(2))
Unsigned 32-bit integer.
UINT64
comptime UINT64 = TensorMapDataType(Int32(4))
Unsigned 64-bit integer.
UINT8
comptime UINT8 = TensorMapDataType(Int32(0))
Unsigned 8-bit integer.
Methods
from_dtype
static from_dtype[dtype: DType]() -> Self
Converts a Mojo DType to the corresponding TMA data type.
Constraints:
The dtype must be one of the supported types listed above.
Parameters:
- dtype (
DType): The Mojo data type to convert. Must be one ofDType.float32,DType.float16,DType.bfloat16,DType.uint8,DType.uint16,DType.int64,DType.uint64,DType.float8_e4m3fn, orDType.float8_e8m0fnu.
Returns:
Self: The corresponding TensorMapDataType value.