|
Mila
Deep Neural Network Library
|
Abstract tensor data type enumeration and traits system for device-agnostic tensor operations. More...
#include <string>#include <stdexcept>Namespaces | |
| namespace | Mila |
| Mila main API namespace. | |
Typedefs | |
| using | Mila::Dnn::dtype_t = TensorDataType |
| Alias for TensorDataType enumeration. | |
Enumerations | |
| enum class | Mila::Dnn::TensorDataType { FP32 , FP16 , BF16 , FP8_E4M3 , FP8_E5M2 , FP4_E2M1 , FP4_E3M0 , INT8 , INT16 , INT32 , UINT8 , UINT16 , UINT32 } |
| Enumeration of supported abstract tensor data types. More... | |
Functions | |
| TensorDataType | Mila::Dnn::parseTensorDataType (const std::string &type_str) |
| std::string | Mila::Dnn::tensorDataTypeToString (TensorDataType type) |
| Converts TensorDataType enumeration to human-readable string. | |
Abstract tensor data type enumeration and traits system for device-agnostic tensor operations.
This module provides a comprehensive type abstraction layer that enables tensor operations across different compute devices (CPU, CUDA, Metal, OpenCL) without exposing device-specific concrete types to host compilation. The system supports standard floating-point and integer types as well as advanced precision formats including FP8, FP4, and packed sub-byte types.
|
export |
Alias for TensorDataType enumeration.
Provides a concise alias for the TensorDataType enumeration to improve code readability in tensor-related contexts.
|
exportstrong |
Enumeration of supported abstract tensor data types.
Defines device-agnostic tensor data types that can be mapped to concrete implementations on different compute devices. This abstraction prevents host compilation issues with device-specific types while enabling compile-time dispatch and optimization.
Supported categories: