GpuOptimizer

Helpers & Utilities · AiDotNet.Tensors.Engines.Gpu

No summary documentation available yet.

Methods

Method Summary
DeviceGradientNorm TryClipGradNorm(IReadOnlyList<Tensor<float>> gradients, double maxNorm)
DeviceGradientNorm TryClipGradNorm(IReadOnlyList<Tensor<float>> gradients, double maxNorm, NonFiniteGradientPolicy nonFinite)
DeviceGradientNorm TryGradientSumOfSquares(IReadOnlyList<Tensor<float>> gradients)
Tensor<float> CreateStateTensor(int[] shape)
bool TryAdadeltaStep(Tensor<float> p, Tensor<float> g, Tensor<float> accumGrad, Tensor<float> accumUpdate, float rho, float epsilon, float weightDecay)
bool TryAdadeltaStepSparse(Tensor<float> param, Tensor<float> accumGrad, Tensor<float> accumUpdate, Tensor<int> sparseIndices, Tensor<float> sparseValues, int nnz, float rho, float epsilon, float weightDecay)
bool TryAdagradStep(Tensor<float> p, Tensor<float> g, Tensor<float> accum, float lr, float epsilon, float weightDecay)
bool TryAdagradStepSparse(Tensor<float> param, Tensor<float> accum, Tensor<int> sparseIndices, Tensor<float> sparseValues, int nnz, float lr, float epsilon, float weightDecay)
bool TryAdam8BitStep(Tensor<float> p, Tensor<float> g, IGpuBuffer mQ, IGpuBuffer vQ, IGpuBuffer mScales, IGpuBuffer vScales, float lr, float beta1, float beta2, float epsilon, float biasCorrection1, float biasCorrection2, int blockSize)
bool TryAdam8BitStep(Tensor<float> p, Tensor<float> g, IGpuBuffer mQ, IGpuBuffer vQ, IGpuBuffer mScales, IGpuBuffer vScales, float lr, float beta1, float beta2, float epsilon, float biasCorrection1, float biasCorrection2, int blockSize, float weightDecay, bool decoupledWeightDecay)
bool TryAdamBf16Step(Tensor<float> p, Tensor<float> g, IGpuBuffer m, IGpuBuffer v, float lr, float beta1, float beta2, float epsilon, float weightDecay, int step, bool decoupledWeightDecay)
bool TryAdamStep(Tensor<float> param, Tensor<float> grad, Tensor<float> m, Tensor<float> v, float learningRate, float beta1, float beta2, float epsilon, float weightDecay, int step)
bool TryAdamStepSparse(Tensor<float> param, Tensor<float> m, Tensor<float> v, Tensor<int> sparseIndices, Tensor<float> sparseValues, int nnz, float learningRate, float beta1, float beta2, float epsilon, float weightDecay, int step)
bool TryAdamWStep(Tensor<float> param, Tensor<float> grad, Tensor<float> m, Tensor<float> v, float learningRate, float beta1, float beta2, float epsilon, float weightDecay, int step)
bool TryAdamWStepSparse(Tensor<float> param, Tensor<float> m, Tensor<float> v, Tensor<int> sparseIndices, Tensor<float> sparseValues, int nnz, float learningRate, float beta1, float beta2, float epsilon, float weightDecay, int step)
bool TryAdamaxStep(Tensor<float> p, Tensor<float> g, Tensor<float> m, Tensor<float> u, float lr, float beta1, float beta2, float epsilon, float weightDecay, int step)
bool TryAdamaxStepSparse(Tensor<float> param, Tensor<float> m, Tensor<float> u, Tensor<int> sparseIndices, Tensor<float> sparseValues, int nnz, float lr, float beta1, float beta2, float epsilon, float weightDecay, int step)
bool TryAllocAdam8BitState(int length, int blockSize, IGpuBuffer mQ, IGpuBuffer vQ, IGpuBuffer mScales, IGpuBuffer vScales)
bool TryAllocBf16MomentState(int length, IGpuBuffer m, IGpuBuffer v)
bool TryAmsgradStep(Tensor<float> p, Tensor<float> g, Tensor<float> m, Tensor<float> v, Tensor<float> vMax, float lr, float beta1, float beta2, float epsilon, float weightDecay, int step)
bool TryAmsgradStepSparse(Tensor<float> param, Tensor<float> m, Tensor<float> v, Tensor<float> vMax, Tensor<int> sparseIndices, Tensor<float> sparseValues, int nnz, float lr, float beta1, float beta2, float epsilon, float weightDecay, int step)
bool TryFtrlStep(Tensor<float> p, Tensor<float> g, Tensor<float> z, Tensor<float> n, float lr, float l1Reg, float l2Reg, float beta)
bool TryFtrlStepSparse(Tensor<float> param, Tensor<float> z, Tensor<float> n, Tensor<int> sparseIndices, Tensor<float> sparseValues, int nnz, float lr, float l1Reg, float l2Reg, float beta)
bool TryLambStep(Tensor<float> p, Tensor<float> g, Tensor<float> m, Tensor<float> v, float lr, float beta1, float beta2, float epsilon, float weightDecay, int step, float maxTrustRatio, bool biasCorrection)
bool TryLarsStep(Tensor<float> p, Tensor<float> g, Tensor<float> velocity, float lr, float momentum, float weightDecay, float trustCoeff)
bool TryLionStep(Tensor<float> p, Tensor<float> g, Tensor<float> m, float lr, float beta1, float beta2, float weightDecay)
bool TryLionStepSparse(Tensor<float> param, Tensor<float> m, Tensor<int> sparseIndices, Tensor<float> sparseValues, int nnz, float lr, float beta1, float beta2, float weightDecay)
bool TryNadamStep(Tensor<float> p, Tensor<float> g, Tensor<float> m, Tensor<float> v, float lr, float beta1, float beta2, float epsilon, float weightDecay, int step)
bool TryNadamStepSparse(Tensor<float> param, Tensor<float> m, Tensor<float> v, Tensor<int> sparseIndices, Tensor<float> sparseValues, int nnz, float lr, float beta1, float beta2, float epsilon, float weightDecay, int step)
bool TryNagStep(Tensor<float> p, Tensor<float> g, Tensor<float> velocity, float lr, float momentum, float weightDecay)
bool TryNagStepSparse(Tensor<float> param, Tensor<float> velocity, Tensor<int> sparseIndices, Tensor<float> sparseValues, int nnz, float lr, float momentum, float weightDecay)
bool TryProximalL1Step(Tensor<float> p, Tensor<float> g, float lr, float l1Strength)
bool TryProximalL1StepSparse(Tensor<float> param, Tensor<int> sparseIndices, Tensor<float> sparseValues, int nnz, float lr, float l1Strength)
bool TryRmspropStep(Tensor<float> p, Tensor<float> g, Tensor<float> squaredAvg, float lr, float rho, float epsilon, float weightDecay)
bool TryRmspropStepSparse(Tensor<float> param, Tensor<float> squaredAvg, Tensor<int> sparseIndices, Tensor<float> sparseValues, int nnz, float lr, float rho, float epsilon, float weightDecay)
bool TrySgdMomentumStep(Tensor<float> p, Tensor<float> g, Tensor<float> velocity, float lr, float momentum, float weightDecay)
bool TrySgdMomentumStepSparse(Tensor<float> param, Tensor<float> velocity, Tensor<int> sparseIndices, Tensor<float> sparseValues, int nnz, float learningRate, float momentum, float weightDecay)
bool TrySgdStep(Tensor<float> param, Tensor<float> grad, float learningRate)
bool TrySgdStepMultiTensor(IReadOnlyList<Tensor<float>> parameters, IReadOnlyList<Tensor<float>> gradients, float learningRate)
bool TrySgdStepSparse(Tensor<float> param, Tensor<int> sparseIndices, Tensor<float> sparseValues, int nnz, float learningRate, float weightDecay)
void FreeGpuBuffer(IGpuBuffer buffer)