Mila
Deep Neural Network Library
Loading...
Searching...
No Matches
Mila::Dnn::Compute::AMPConfig Class Referenceexport

Public Types

enum class  OpPrecision {
  FP32 , FP16 , BF16 , FP8 ,
  Auto , Default
}
 

Public Member Functions

 AMPConfig (OpPrecision precision=OpPrecision::Auto)
 
template<typename T >
cudaDataType_t getComputeType () const
 
template<typename TPrecision , typename TCompute = float>
cublasComputeType_t getCublasComputeType () const
 Get the appropriate cuBLASLt compute type based on storage and precision settings.
 
bool useLossScaling () const
 
bool useReducedPrecision () const
 
bool useTensorCores () const
 Determine if TensorCore acceleration should be used.
 

Private Attributes

OpPrecision precision_
 

Member Enumeration Documentation

◆ OpPrecision

Enumerator
FP32 
FP16 
BF16 
FP8 
Auto 
Default 

Constructor & Destructor Documentation

◆ AMPConfig()

Mila::Dnn::Compute::AMPConfig::AMPConfig ( OpPrecision  precision = OpPrecision::Auto)
inline

Member Function Documentation

◆ getComputeType()

template<typename T >
cudaDataType_t Mila::Dnn::Compute::AMPConfig::getComputeType ( ) const
inline

◆ getCublasComputeType()

template<typename TPrecision , typename TCompute = float>
cublasComputeType_t Mila::Dnn::Compute::AMPConfig::getCublasComputeType ( ) const
inline

Get the appropriate cuBLASLt compute type based on storage and precision settings.

Template Parameters
TPrecisionThe storage data type
TComputeThe desired computation data type
Returns
cublasComputeType_t The recommended cuBLASLt compute type

◆ useLossScaling()

bool Mila::Dnn::Compute::AMPConfig::useLossScaling ( ) const
inline

◆ useReducedPrecision()

bool Mila::Dnn::Compute::AMPConfig::useReducedPrecision ( ) const
inline

◆ useTensorCores()

bool Mila::Dnn::Compute::AMPConfig::useTensorCores ( ) const
inline

Determine if TensorCore acceleration should be used.

Returns
bool True if TensorCore acceleration should be used

Member Data Documentation

◆ precision_

OpPrecision Mila::Dnn::Compute::AMPConfig::precision_
private

The documentation for this class was generated from the following file: