Intel® Math Kernel Library 2019 Developer Reference - C

dnnExecute

Performs DNN operations. Note: The Deep Neural Network (DNN) component in Intel MKL is deprecated and will be removed in a future release. You can continue to use optimized functions for deep neural networks through Intel Math Kernel Library for Deep Neural Networks.

Syntax

dnnError_t dnnExecute_F32 (dnnPrimitive_t primitive, void *resources[]);

dnnError_t dnnExecute_F64 (dnnPrimitive_t primitive, void *resources[]);

Include Files

Input Parameters

primitive

The description of a DNN operation to perform.

resources

An array of pointers to the resources according to the following table:

DNN Operation

Indices of input resources

Convolution forward without bias

dnnResourceSrc, dnnResourceFilter

Convolution forward with bias

dnnResourceSrc, dnnResourceFilter, dnnResourceBias

Convolution backward with respect to data

dnnResourceDiffDst, dnnResourceFilter

Convolution backward with respect to filter

dnnResourceDiffDst, dnnResourceSrc

Convolution backward with respect to bias

dnnResourceDiffDst

Inner product forward without bias

dnnResourceSrc, dnnResourceFilter

Inner product forward with bias

dnnResourceSrc, dnnResourceFilter, dnnResourceBias

Inner product backward with respect to data

dnnResourceDiffDst, dnnResourceFilter

Inner product backward with respect to filter

dnnResourceDiffDst, dnnResourceSrc

Inner product backward with respect to bias

dnnResourceDiffDst

LRN forward

dnnResourceSrc, dnnResourceWorkspace

LRN backward

dnnResourceDiffDst, dnnResourceWorkspace

ReLU forward

dnnResourceSrc

ReLU backward

dnnResourceDiffDst

Pooling forward

dnnResourceSrc, dnnResourceWorkspace

Pooling backward

dnnResourceDiffDst, dnnResourceWorkspace

Batch normalization forward

dnnResourceSrc, dnnResourceScaleShift, dnnResourceWorkspace

Batch normalization backward with respect to data

dnnResourceDiffDst, dnnResourceScaleShift, dnnResourceWorkspace

Batch normalization backward with respect to scale and shift

dnnResourceSrc, dnnResourceDiffDst, dnnResourceWorkspace

Batch normalization forward with specified computation method; created in a call to dnnBatchNormalizationCreate_v2 with flags parameter.

dnnResourceSrc, dnnResourceScaleShift if flags values include dnnUseScaleShift, dnnResourceMean if flags values include dnnUseInputMeanVariance, dnnResourceVariance if flags values include dnnUseInputMeanVariance

Batch normalization backward with specified computation method

dnnResourceSrc, dnnResourceDiffDst, dnnResourceScaleShift if flags values include dnnUseScaleShift, dnnResourceMean, dnnResourceVariance

Split

dnnResourceSrc

Concat

dnnResourceMultipleSrc, dnnResourceMultipleSrc+1, ..., dnnResourceMultipleSrc+N-1

Sum

dnnResourceMultipleSrc, dnnResourceMultipleSrc+1, ..., dnnResourceMultipleSrc+N-1

Output Parameters

resources

An array of pointers to the resources according to the following table:

DNN Operation

Indices of output resources

Convolution forward without bias

dnnResourceDst

Convolution forward with bias

dnnResourceDst

Convolution backward with respect to data

dnnResourceDiffSrc

Convolution backward with respect to filter

dnnResourceDiffFilter

Convolution backward with respect to bias

dnnResourceDiffBias

Inner product forward without bias

dnnResourceDst

Inner product forward with bias

dnnResourceDst

Inner product backward with respect to data

dnnResourceDiffSrc

Inner product backward with respect to filter

dnnResourceDiffFilter

Inner product backward with respect to bias

dnnResourceDiffBias

ReLU, LRN forward

dnnResourceDst

ReLU, LRN backward

dnnResourceDiffSrc

Pooling forward

dnnResourceDst

Pooling backward

dnnResourceDiffSrc

Batch normalization forward

dnnResourceDst

Batch normalization backward with respect to data

dnnResourceDiffSrc

Batch normalization backward with respect to scale and shift

dnnResourceDiffScaleShift

Batch normalization forward with specified computation method; created in a call to dnnBatchNormalizationCreate_v2 with flags parameter.

dnnResourceDst,
dnnResourceMean if flags values include dnnUseInputMeanVariance, dnnResourceVariance if flags values include dnnUseInputMeanVariance

Batch normalization backward with specified computation method

dnnResourceDiffSrc, dnnResourceDiffScaleShift if flags values include dnnUseScaleShift

Split

dnnResourceMultipleDst, dnnResourceMultipleDst+1, ..., dnnResourceMultipleDst+N-1

Concat

dnnResourceDst

Sum

dnnResourceDst

Description

Each dnnExecute function performs a DNN operation on given resources. All the required resources, including the output resources, must point to arrays having a plain layout or to the arrays allocated with a dnnAllocateBuffer function. The dnnExecute functions do not use the remaining elements of the resources array in dereferencing operations.

The following table explains more usage details of dnnExecute for specific operations:

DNN Operation

Indices of output resources

Local response normalization

The resource indexed dnnResourceWorkspace is required on forward and backward propagations. On backward propagation, use the buffer allocated for the workspace on forward propagation.

Pooling

The resource indexed dnnResourceWorkspace is required on forward and backward propagations. On backward propagation, use the buffer allocated for the workspace on forward propagation.

Pooling

The resource indexed dnnResourceWorkspace is required on forward and backward propagations. On backward propagation, use the buffer allocated for the workspace on forward propagation.

Batch normalization

Perform backward batch normalization with respect to data before backward batch normalization with respect to scale and shift.

The resource indexed dnnResourceWorkspace is required on forward and backward propagations. On backward propagation, use the buffer allocated for the workspace on forward propagation.

Batch normalization with specified computation method; created with dnnBatchNormalizationCreate_v2

The resources indexed dnnResourceMean and dnnResourceVariance are required on forward and backward propagations. On backward propagation, use the buffers allocated for the mean and variance on forward propagation.

See Also