Dnnl
Functions
add
Link copied to clipboard
fun add(left: StridedFloatTensor, right: StridedFloatTensor): StridedFloatTensor
Content copied to clipboard
avg Pool
Link copied to clipboard
external fun avgPool(resultShape: IntArray, result: FloatArray, imagesShape: IntArray, images: FloatArray, poolHeight: Int, poolWidth: Int)
Content copied to clipboard
avg Pool Grad
Link copied to clipboard
external fun avgPoolGrad(resultShape: IntArray, result: FloatArray, seedShape: IntArray, seed: FloatArray, poolHeight: Int, poolWidth: Int)
Content copied to clipboard
batch Norm
Link copied to clipboard
external fun batchNorm(resultShape: IntArray, result: FloatArray, mean: FloatArray, variance: FloatArray, input: FloatArray, scaleShift: FloatArray)
Content copied to clipboard
batch Norm Grad
Link copied to clipboard
fun batchNormGrad(seed: FloatTensor, input: FloatTensor, scaleShift: FloatTensor, mean: FloatTensor, variance: FloatTensor): Pair<FloatTensor, FloatTensor>
Content copied to clipboard
Convenience wrapper for DNNL batchnorm grad.
conv2d
Link copied to clipboard
external fun conv2d(resultShape: IntArray, result: FloatArray, inputShape: IntArray, input: FloatArray, filtersShape: IntArray, filters: FloatArray, hstride: Int, vstride: Int, paddingLeft: Int, paddingRight: Int, paddingTop: Int, paddingBottom: Int)
Content copied to clipboard
conv2d Grad Filter
Link copied to clipboard
external fun conv2dGradFilter(resultShape: IntArray, result: FloatArray, seedShape: IntArray, seed: FloatArray, imagesShape: IntArray, images: FloatArray, hstride: Int, vstride: Int, paddingLeft: Int, paddingRight: Int, paddingTop: Int, paddingBottom: Int)
Content copied to clipboard
conv2d Grad Image
Link copied to clipboard
external fun conv2dGradImage(resultShape: IntArray, result: FloatArray, seedShape: IntArray, seed: FloatArray, filtersShape: IntArray, filters: FloatArray, hstride: Int, vstride: Int, paddingLeft: Int, paddingRight: Int, paddingTop: Int, paddingBottom: Int)
Content copied to clipboard
linear
Link copied to clipboard
external fun linear(shape: IntArray, strides: IntArray, offset: Int, res: FloatArray, input: FloatArray, scale: Float, shift: Float)
Content copied to clipboard
log Softmax
Link copied to clipboard
external fun logSoftmax(shape: IntArray, input: FloatArray, res: FloatArray, axis: Int)
Content copied to clipboard
log Softmax Grad
Link copied to clipboard
external fun logSoftmaxGrad(shape: IntArray, grad: FloatArray, seed: FloatArray, fwdRes: FloatArray, axis: Int)
Content copied to clipboard
Given the result of the forward op and the seed, returns the grad
matmul
Link copied to clipboard
fun matmul(left: StridedFloatTensor, right: StridedFloatTensor, a: Shape, b: Shape, d: Shape): StridedFloatTensor
Content copied to clipboard
external fun matmul(lhsShape: IntArray, lhsStrides: IntArray, lhsOffset: Int, rhsShape: IntArray, rhsStrides: IntArray, rhsOffset: Int, result: FloatArray, lhs: FloatArray, rhs: FloatArray)
Content copied to clipboard
max Pool
Link copied to clipboard
external fun maxPool(resultShape: IntArray, result: FloatArray, workspace: ByteArray, imagesShape: IntArray, images: FloatArray, poolHeight: Int, poolWidth: Int)
Content copied to clipboard
max Pool Grad
Link copied to clipboard
external fun maxPoolGrad(resultShape: IntArray, result: FloatArray, workspace: ByteArray, seedShape: IntArray, seed: FloatArray, poolHeight: Int, poolWidth: Int)
Content copied to clipboard
mul Scalar
Link copied to clipboard
reduce Sum
Link copied to clipboard
external fun reduceSum(resultShape: IntArray, result: FloatArray, inputShape: IntArray, input: FloatArray)
Content copied to clipboard
relu
Link copied to clipboard
external fun relu(shape: IntArray, result: FloatArray, input: FloatArray)
Content copied to clipboard
relu Grad
Link copied to clipboard
external fun reluGrad(shape: IntArray, result: FloatArray, seed: FloatArray, input: FloatArray)
Content copied to clipboard
sub
Link copied to clipboard
fun sub(left: StridedFloatTensor, right: StridedFloatTensor): StridedFloatTensor
Content copied to clipboard