Dnnl

object Dnnl : ExternalLib

Functions

add
Link copied to clipboard
fun add(left: StridedFloatTensor, right: StridedFloatTensor): StridedFloatTensor
avgPool
Link copied to clipboard
external fun avgPool(resultShape: IntArray, result: FloatArray, imagesShape: IntArray, images: FloatArray, poolHeight: Int, poolWidth: Int)
avgPoolGrad
Link copied to clipboard
external fun avgPoolGrad(resultShape: IntArray, result: FloatArray, seedShape: IntArray, seed: FloatArray, poolHeight: Int, poolWidth: Int)
batchNorm
Link copied to clipboard
external fun batchNorm(resultShape: IntArray, result: FloatArray, mean: FloatArray, variance: FloatArray, input: FloatArray, scaleShift: FloatArray)
batchNormGrad
Link copied to clipboard
fun batchNormGrad(seed: FloatTensor, input: FloatTensor, scaleShift: FloatTensor, mean: FloatTensor, variance: FloatTensor): Pair<FloatTensor, FloatTensor>

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)
conv2dGradFilter
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)
conv2dGradImage
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)
linear
Link copied to clipboard
external fun linear(shape: IntArray, strides: IntArray, offset: Int, res: FloatArray, input: FloatArray, scale: Float, shift: Float)
logSoftmax
Link copied to clipboard
external fun logSoftmax(shape: IntArray, input: FloatArray, res: FloatArray, axis: Int)
logSoftmaxGrad
Link copied to clipboard
external fun logSoftmaxGrad(shape: IntArray, grad: FloatArray, seed: FloatArray, fwdRes: FloatArray, axis: Int)

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
external fun matmul(lhsShape: IntArray, lhsStrides: IntArray, lhsOffset: Int, rhsShape: IntArray, rhsStrides: IntArray, rhsOffset: Int, result: FloatArray, lhs: FloatArray, rhs: FloatArray)
maxPool
Link copied to clipboard
external fun maxPool(resultShape: IntArray, result: FloatArray, workspace: ByteArray, imagesShape: IntArray, images: FloatArray, poolHeight: Int, poolWidth: Int)
maxPoolGrad
Link copied to clipboard
external fun maxPoolGrad(resultShape: IntArray, result: FloatArray, workspace: ByteArray, seedShape: IntArray, seed: FloatArray, poolHeight: Int, poolWidth: Int)
mulScalar
Link copied to clipboard
fun mulScalar(x: FloatTensor, alpha: Float): FloatTensor
reduceSum
Link copied to clipboard
external fun reduceSum(resultShape: IntArray, result: FloatArray, inputShape: IntArray, input: FloatArray)
relu
Link copied to clipboard
external fun relu(shape: IntArray, result: FloatArray, input: FloatArray)
reluGrad
Link copied to clipboard
external fun reluGrad(shape: IntArray, result: FloatArray, seed: FloatArray, input: FloatArray)
sub
Link copied to clipboard
fun sub(left: StridedFloatTensor, right: StridedFloatTensor): StridedFloatTensor

Properties

isLoaded
Link copied to clipboard
open override val isLoaded: Boolean