AutocastScope

Models & Types · AiDotNet.Tensors.Engines.Gpu

No summary documentation available yet.

Implements: IDisposable

Constructors

Constructor Summary
AutocastScope(PrecisionMode precision)
AutocastScope(PrecisionMode precision, LayerPrecisionPolicy policy)

Properties

Property Summary
AutocastScope Current { get; }
LayerPrecisionPolicy Policy { get; }
PrecisionMode ActivePrecision { get; }
PrecisionMode Precision { get; }
bool IsEnabled { get; }

Methods

Method Summary
AutocastScope EnableFromEnvironment()
IGpuBuffer MaybeConvertInput(IDirectGpuBackend backend, IGpuBuffer fp32Buffer, int size, GpuPrecisionOperation operation)
IGpuBuffer MaybeConvertOutput(IDirectGpuBackend backend, IGpuBuffer resultBuffer, int size, GpuPrecisionOperation operation)
PrecisionMode EnvironmentRequestedPrecision()
Tensor<Half> CastToFP16(Tensor<float> fp32)
Tensor<Half> GetFP16Tensor(string name)
Tensor<Half> RegisterAndCastToFP16(string name, Tensor<float> fp32)
Tensor<float> CastToFP32(Tensor<Half> fp16)
Tensor<float> GetFP32Tensor(string name)
bool HasTensor(string name)
bool ShouldAutocast(string operationName)
bool ShouldUseFP32(string layerName)
bool ShouldUseHigherPrecision(string layerName)
void ClearTensors()
void Dispose()