tensor/tensor_math_gpu library

Functions

absGPU<T>(GPUTensor<T> a, CommandBuffer tape) GPUTensor<T>
adamUpdateGPU(GPUTensor data, GPUTensor m, GPUTensor v, double lr, double beta1, double beta2, double eps, int step, double weightDecay, CommandBuffer tape) → void
add3DGPU(GPUTensor<Tensor3D> a, GPUTensor<Tensor3D> b, CommandBuffer tape) GPUTensor<Tensor3D>
addBiasToFeatureMapGPU(GPUTensor<Matrix> m, GPUTensor<Matrix> b, CommandBuffer tape) GPUTensor<Matrix>
addBiasToMatMulOutGPU(GPUTensor<Matrix> m, GPUTensor<Vector> b, CommandBuffer tape) GPUTensor<Matrix>
addGPU<T>(GPUTensor<T> a, GPUTensor<T> b, CommandBuffer tape) GPUTensor<T>
///////////////////////////////// Basic Math (100-199) /// /////////////////////////////////
addMatrixAndVectorGPU(GPUTensor<Matrix> m, GPUTensor<Vector> v, CommandBuffer tape) GPUTensor<Matrix>
addMatrixGPU(GPUTensor<Matrix> a, GPUTensor<Matrix> b, CommandBuffer tape) GPUTensor<Matrix>
addScalar3DGPU(GPUTensor<Tensor3D> t, double scalar, CommandBuffer tape) GPUTensor<Tensor3D>
addScalarMatrixGPU(GPUTensor<Matrix> m, GPUTensor<Scalar> b, CommandBuffer tape) GPUTensor<Matrix>
addScalarVectorGPU(GPUTensor<Vector> v, double scalar, CommandBuffer tape) GPUTensor<Vector>
addVectorGPU(GPUTensor<Vector> a, GPUTensor<Vector> b, CommandBuffer tape) GPUTensor<Vector>
avgPool2dGPU(GPUTensor<Matrix> input, int poolSize, int stride, CommandBuffer tape) GPUTensor<Matrix>
batchNorm1dGPU(GPUTensor<Vector> input, GPUTensor<Vector> gamma, GPUTensor<Vector> beta, GPUTensor<Vector> runningMean, GPUTensor<Vector> runningVariance, double momentum, double epsilon, bool isTraining, CommandBuffer tape) GPUTensor<Vector>
batchNorm2dGPU(GPUTensor<Tensor3D> input, GPUTensor<Vector> gamma, GPUTensor<Vector> beta, GPUTensor<Vector> runningMean, GPUTensor<Vector> runningVariance, double momentum, double epsilon, bool isTraining, CommandBuffer tape) GPUTensor<Tensor3D>
binaryCrossEntropyGPU<T>(GPUTensor<T> prediction, GPUTensor<T> target, CommandBuffer tape) GPUTensor<Scalar>
///////////////////////////////// Loss Functions (400-499) /// /////////////////////////////////
broadcastAddVectorToMatrixGPU(GPUTensor<Matrix> m, GPUTensor<Vector> v, CommandBuffer tape) GPUTensor<Matrix>
buildMarkovTableGPU(GPUTensor<Vector> sequence, int order, int numStates, CommandBuffer tape) GPUTensor<Matrix>
clampGPU<T>(GPUTensor<T> a, double minVal, double maxVal, CommandBuffer tape) GPUTensor<T>
clipGradValueGPU(GPUTensor tensor, double clipValue, CommandBuffer tape) → void
concatenate3DGPU(GPUTensor<Tensor3D> a, GPUTensor<Tensor3D> b, CommandBuffer tape) GPUTensor<Tensor3D>
concatenateGPU(GPUTensor<Vector> a, GPUTensor<Vector> b, CommandBuffer tape) GPUTensor<Vector>
concatenateMatricesByColumnGPU(List<GPUTensor<Matrix>> matrices, CommandBuffer tape) GPUTensor<Matrix>
conv2dMultiChannelGPU(GPUTensor input, GPUTensor<Tensor3D> weight, GPUTensor<Vector> bias, int kH, int kW, CommandBuffer tape, {String padding = 'valid', int strideH = 1, int strideW = 1}) GPUTensor<Tensor3D>
///////////////////////////////// Advanced Layers (800- 999) /// /////////////////////////////////
conv2dSimpleGPU(GPUTensor<Matrix> input, GPUTensor<Matrix> kernel, CommandBuffer tape) GPUTensor<Matrix>
cosineSimilarityGPU(GPUTensor<Vector> a, GPUTensor<Vector> b, CommandBuffer tape) GPUTensor<Scalar>
divide3DGPU(GPUTensor<Tensor3D> a, GPUTensor<Tensor3D> b, CommandBuffer tape) GPUTensor<Tensor3D>
divideGPU<T>(GPUTensor<T> a, GPUTensor<T> b, CommandBuffer tape) GPUTensor<T>
divideMatrixGPU(GPUTensor<Matrix> a, GPUTensor<Matrix> b, CommandBuffer tape) GPUTensor<Matrix>
divideVectorGPU(GPUTensor<Vector> a, GPUTensor<Vector> b, CommandBuffer tape) GPUTensor<Vector>
dotProductGPU(GPUTensor<Vector> a, GPUTensor<Vector> b, CommandBuffer tape) GPUTensor<Scalar>
dropoutGPU<T>(GPUTensor<T> input, double rate, CommandBuffer tape) GPUTensor<T>
elementWiseMultiply3DGPU(GPUTensor<Tensor3D> a, GPUTensor<Tensor3D> b, CommandBuffer tape) GPUTensor<Tensor3D>
elementWiseMultiplyGPU(GPUTensor<Vector> a, GPUTensor<Vector> b, CommandBuffer tape) GPUTensor<Vector>
elementWiseMultiplyMatrixGPU(GPUTensor<Matrix> a, GPUTensor<Matrix> b, CommandBuffer tape) GPUTensor<Matrix>
embeddingLookupBatchGPU(GPUTensor<Matrix> batchIndices, GPUTensor<Matrix> weights, CommandBuffer tape) GPUTensor<Tensor3D>
embeddingLookupGPU(GPUTensor<Vector> indices, GPUTensor<Matrix> weights, CommandBuffer tape) GPUTensor<Matrix>
euclideanDistanceGPU(GPUTensor<Vector> a, GPUTensor<Vector> b, CommandBuffer tape) GPUTensor<Scalar>
flatten3DToMatrixGPU(GPUTensor<Tensor3D> t, CommandBuffer tape) GPUTensor<Matrix>
geluGPU(GPUTensor<Vector> v, CommandBuffer tape) GPUTensor<Vector>
geluMatrixGPU(GPUTensor<Matrix> m, CommandBuffer tape) GPUTensor<Matrix>
globalAveragePoolingGPU(GPUTensor<Matrix> input, CommandBuffer tape) GPUTensor<Vector>
im2colGPU(GPUTensor input, int kH, int kW, CommandBuffer tape) GPUTensor<Matrix>
l2NormGPU(GPUTensor<Vector> v, CommandBuffer tape) GPUTensor<Scalar>
layerNormMatrixGPU(GPUTensor<Matrix> m, GPUTensor<Vector> gamma, GPUTensor<Vector> beta, GPUTensor<Vector> meanCache, GPUTensor<Vector> rstdCache, double epsilon, CommandBuffer tape) GPUTensor<Matrix>
loadSampleGPU(GPUTensor<Matrix> dataset, int sampleIndex, CommandBuffer tape) GPUTensor<Vector>
logGPU<T>(GPUTensor<T> a, CommandBuffer tape) GPUTensor<T>
maeLossGPU(GPUTensor<Vector> preds, GPUTensor<Vector> targets, CommandBuffer tape) GPUTensor<Scalar>
markovPredictGPU(GPUTensor<Matrix> historyBatch, GPUTensor<Matrix> probTable, int numStates, CommandBuffer tape) GPUTensor<Matrix>
Predicts the next state probabilities given a batch of histories.
matMulBiasReluGPU(GPUTensor<Matrix> x, GPUTensor<Matrix> w, GPUTensor<Vector> b, CommandBuffer tape, List<GPUTensor> intermediates) GPUTensor<Matrix>
///////////////////////////////// Fused Kernels (1000+) /// /////////////////////////////////
matMulGPU(GPUTensor<Matrix> a, GPUTensor<Matrix> b, CommandBuffer tape) GPUTensor<Matrix>
///////////////////////////////// Matrix Operations (200-299) /// /////////////////////////////////
matVecMulGPU(GPUTensor<Matrix> mMat, GPUTensor<Vector> v, CommandBuffer tape) GPUTensor<Vector>
maxPool1dGPU(GPUTensor<Vector> input, int poolSize, int stride, CommandBuffer tape) GPUTensor<Vector>
maxPool2dGPU(GPUTensor<Matrix> input, int poolSize, int stride, CommandBuffer tape) GPUTensor<Matrix>
mseGPU(GPUTensor<Vector> predictions, GPUTensor<Vector> targets, CommandBuffer tape) GPUTensor<Scalar>
mseMatrixGPU(GPUTensor<Matrix> predictions, GPUTensor<Matrix> targets, CommandBuffer tape) GPUTensor<Scalar>
multiplyGPU<T>(GPUTensor<T> a, GPUTensor<T> b, CommandBuffer tape) GPUTensor<T>
multiplyScalarGPU(GPUTensor<Scalar> a, GPUTensor<Scalar> b, CommandBuffer tape) GPUTensor<Scalar>
padMatrixGPU(GPUTensor<Matrix> input, int padSize, CommandBuffer tape) GPUTensor<Matrix>
powGPU<T>(GPUTensor<T> a, double exponent, CommandBuffer tape) GPUTensor<T>
reluGPU(GPUTensor<Vector> v, CommandBuffer tape) GPUTensor<Vector>
///////////////////////////////// Activations (300-399) /// /////////////////////////////////
reluMatrixGPU(GPUTensor<Matrix> m, CommandBuffer tape) GPUTensor<Matrix>
reshape3DToMatrixGPU(GPUTensor<Tensor3D> t, int rows, int cols, CommandBuffer tape) GPUTensor<Matrix>
reshapeMatrixTo3DGPU(GPUTensor<Matrix> m, int c, int h, int w, CommandBuffer tape) GPUTensor<Tensor3D>
reshapeVectorToMatrixGPU(GPUTensor<Vector> v, int numRows, int numCols, CommandBuffer tape) GPUTensor<Matrix>
///////////////////////////////// Data management (0-99) /// /////////////////////////////////
scaleMatrixGPU(GPUTensor<Matrix> m, double s, CommandBuffer tape) GPUTensor<Matrix>
scatterHeadsGPU(List<GPUTensor<Matrix>> heads, int dModel, CommandBuffer tape) GPUTensor<Matrix>
selectMatrixFrom3DGPU(GPUTensor<Tensor3D> t, int index, CommandBuffer tape) GPUTensor<Matrix>
selectRowGPU(GPUTensor<Matrix> m, int rowIndex, CommandBuffer tape) GPUTensor<Vector>
sgdUpdateGPU(GPUTensor data, double lr, CommandBuffer tape) → void
///////////////////////////////// Optimizers (500-599) /// /////////////////////////////////
sigmoid3DGPU(GPUTensor<Tensor3D> t, CommandBuffer tape) GPUTensor<Tensor3D>
sigmoidGPU(GPUTensor<Vector> v, CommandBuffer tape) GPUTensor<Vector>
sigmoidMatrixGPU(GPUTensor<Matrix> m, CommandBuffer tape) GPUTensor<Matrix>
sigmoidScalarGPU<T>(GPUTensor<T> s, CommandBuffer tape) GPUTensor<T>
sliceColumnGPU(GPUTensor<Matrix> input, int startCol, int endCol, CommandBuffer tape) GPUTensor<Matrix>
///////////////////////////////// Tensor Manipulations(700-799) /// /////////////////////////////////
softmaxMatrixGPU(GPUTensor<Matrix> m, CommandBuffer tape) GPUTensor<Matrix>
sqrtGPU<T>(GPUTensor<T> a, CommandBuffer tape) GPUTensor<T>
stackMatricesGPU(List<GPUTensor<Matrix>> matrices, CommandBuffer tape) GPUTensor<Tensor3D>
subtract3DGPU(GPUTensor<Tensor3D> a, GPUTensor<Tensor3D> b, CommandBuffer tape) GPUTensor<Tensor3D>
subtractGPU<T>(GPUTensor<T> a, GPUTensor<T> b, CommandBuffer tape) GPUTensor<T>
subtractMatrixGPU(GPUTensor<Matrix> a, GPUTensor<Matrix> b, CommandBuffer tape) GPUTensor<Matrix>
subtractVectorGPU(GPUTensor<Vector> a, GPUTensor<Vector> b, CommandBuffer tape) GPUTensor<Vector>
sumGPU(GPUTensor<Vector> v, CommandBuffer tape) GPUTensor<Scalar>
///////////////////////////////// Reductions (600-699) /// /////////////////////////////////
sumMatrixGPU(GPUTensor<Matrix> m, CommandBuffer tape) GPUTensor<Scalar>
sumReduceColumnsGPU(GPUTensor<Matrix> m, CommandBuffer tape) GPUTensor<Vector>
sumReduceRowsGPU(GPUTensor<Matrix> m, CommandBuffer tape) GPUTensor<Vector>
tanh3DGPU(GPUTensor<Tensor3D> t, CommandBuffer tape) GPUTensor<Tensor3D>
tanhMatrixGPU(GPUTensor<Matrix> m, CommandBuffer tape) GPUTensor<Matrix>
transposeGPU(GPUTensor<Matrix> a, CommandBuffer tape) GPUTensor<Matrix>
vectorExpGPU(GPUTensor<Vector> v, CommandBuffer tape) GPUTensor<Vector>
vectorTanhGPU(GPUTensor<Vector> v, CommandBuffer tape) GPUTensor<Vector>