Intel® Math Kernel Library 2018 Developer Reference - C

DNN Operations

The type dnnPrimitive_t is a pointer to an opaque structure that describes DNN operations.

To perform a DNN operation, in your application call available Intel MKL DNN functions to do the following:

  1. Create a description of a DNN operation
  2. Perform the DNN operation
  3. Destroy the description of the operation

To create a description of a DNN operation, call a function:

Here

<Operation> is Convolution, Pooling, Normalization, or ReLU,

<Direction> is Forward or Backward,

<Resource Name>, optional, is Bias, Data, Filter, or an empty string,

<Data Type> is F32 or F64.

To perform a DNN operation, call a dnnExecute_<Data Type> function and pass to it the description of the operation and an array of pointers to operation resources.

Because the dnnConversionExecute_<Data Type> function has a simpler interface than dnnExecute_<Data Type>, if a DNN operation is a conversion, you can alternatively call the dnnExecute_<Data Type> function and pass to it the description of the conversion and pointers to input and output arrays.

To destroy a description of a DNN operation, call a dnnDelete_<Data Type> function.

Notational Conventions

Descriptions of functions that create DNN operations use the following notational conventions:

x, dx
denote dimension-2 spatial indices, where dimension specifies the number of dimensions in the input and output
ic
denotes the index of an input channel
oc
denotes the index of an output channel
bc
denotes the index of an element in a batch