Mila
Deep Neural Network Library
Loading...
Searching...
No Matches
CudaTensorDataTypes-CublasLtTypes.ixx File Reference

Compile-time mapping from abstract TensorDataType to cuBLASLt runtime cudaDataType_t enums. More...

#include <cuda_runtime.h>
#include <cublasLt.h>
#include <cuda_fp16.h>
#include <cuda_bf16.h>
#include <cuda_fp8.h>
#include <type_traits>
import Dnn.TensorDataType;

Classes

struct  Mila::Dnn::Compute::Cuda::CudaDataTypeTraits< TDataType >
 Compile-time mapping from TensorDataType -> cudaDataType_t. More...
struct  Mila::Dnn::Compute::Cuda::CudaDataTypeTraits< TensorDataType::BF16 >
struct  Mila::Dnn::Compute::Cuda::CudaDataTypeTraits< TensorDataType::FP16 >
struct  Mila::Dnn::Compute::Cuda::CudaDataTypeTraits< TensorDataType::FP32 >
struct  Mila::Dnn::Compute::Cuda::CudaDataTypeTraits< TensorDataType::FP8_E4M3 >
struct  Mila::Dnn::Compute::Cuda::CudaDataTypeTraits< TensorDataType::FP8_E5M2 >
struct  Mila::Dnn::Compute::Cuda::CudaDataTypeTraits< TensorDataType::INT32 >
struct  Mila::Dnn::Compute::Cuda::CudaDataTypeTraits< TensorDataType::INT8 >

Namespaces

namespace  Mila
 Mila main API namespace.

Variables

template<TensorDataType TDataType>
constexpr cudaDataType_t Mila::Dnn::Compute::Cuda::cuda_data_type_v = CudaDataTypeTraits<TDataType>::cuda_data_type
 Convenience alias for accessing the cudaDataType_t mapping directly.

Detailed Description

Compile-time mapping from abstract TensorDataType to cuBLASLt runtime cudaDataType_t enums.

Provides CudaDataTypeTraits<TDataType>::cuda_data_type for use in cuBLASLt plan builders. Complements TensorDataTypeMap (C++ device type) and lives as a partition of Compute.CudaTensorDataType so it shares the module's established import chain.

Only types that have a valid cudaDataType_t representation are specialised. Instantiating the primary template for an unsupported type produces a clear static assertion.

Variable Documentation

◆ cuda_data_type_v

template<TensorDataType TDataType>
cudaDataType_t Mila::Dnn::Compute::Cuda::cuda_data_type_v = CudaDataTypeTraits<TDataType>::cuda_data_type
constexprexport

Convenience alias for accessing the cudaDataType_t mapping directly.

Usage: constexpr cudaDataType_t dt = cuda_data_type_v<TensorDataType::BF16>; // dt == CUDA_R_BF16