Mila 0.13.48
Deep Neural Network Library
Loading...
Searching...
No Matches
TensorDataType.ixx File Reference

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.
namespace  Mila::Dnn

Typedefs

using Mila::Dnn::dtype_t = TensorDataType
 Alias for TensorDataType enumeration.

Enumerations

enum class  Mila::Dnn::TensorDataType {
  Mila::Dnn::FP32 , Mila::Dnn::FP16 , Mila::Dnn::BF16 , Mila::Dnn::FP8_E4M3 ,
  Mila::Dnn::FP8_E5M2 , Mila::Dnn::FP4_E2M1 , Mila::Dnn::FP4_E3M0 , Mila::Dnn::INT8 ,
  Mila::Dnn::INT16 , Mila::Dnn::INT32 , Mila::Dnn::UINT8 , Mila::Dnn::UINT16 ,
  Mila::Dnn::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.

Detailed Description

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.