oneAPI Deep Neural Network Library (oneDNN)
Performance library for Deep Learning
1.96.0
dnnl.hpp File Reference

C++ API. More...

#include "oneapi/dnnl/dnnl_config.h"
#include <cstdio>

Go to the source code of this file.

Classes

struct  dnnl::error
 oneDNN exception class. More...
 
struct  dnnl::handle_traits< T >
 A class that provides the destructor for a oneDNN C API handle. More...
 
struct  dnnl::handle< T, traits >
 oneDNN C API handle wrapper class. More...
 
struct  dnnl::primitive
 Base class for all computational primitives. More...
 
struct  dnnl::engine
 An execution engine. More...
 
struct  dnnl::stream
 An execution stream. More...
 
struct  dnnl::memory
 Memory object. More...
 
struct  dnnl::memory::desc
 A memory descriptor. More...
 
struct  dnnl::post_ops
 Post-ops. More...
 
struct  dnnl::primitive_attr
 Primitive attributes. More...
 
struct  dnnl::primitive_desc_base
 Base class for all primitive descriptors. More...
 
struct  dnnl::reorder
 Reorder primitive. More...
 
struct  dnnl::reorder::primitive_desc
 Primitive descriptor for a reorder primitive. More...
 
struct  dnnl::concat
 Tensor concatenation (concat) primitive. More...
 
struct  dnnl::concat::primitive_desc
 Primitive descriptor for a concat primitive. More...
 
struct  dnnl::sum
 Out-of-place summation (sum) primitive. More...
 
struct  dnnl::sum::primitive_desc
 Primitive descriptor for a sum primitive. More...
 
struct  dnnl::primitive_desc
 A base class for descriptors of all primitives that have an operation descriptor and that support iteration over multiple implementations. More...
 
struct  dnnl::convolution_forward
 Convolution forward propagation primitive. More...
 
struct  dnnl::convolution_forward::desc
 Descriptor for a convolution forward propagation primitive. More...
 
struct  dnnl::convolution_forward::primitive_desc
 Primitive descriptor for a convolution forward propagation primitive. More...
 
struct  dnnl::convolution_backward_data
 Convolution backward propagation primitive. More...
 
struct  dnnl::convolution_backward_data::desc
 Descriptor for a convolution backward propagation primitive. More...
 
struct  dnnl::convolution_backward_data::primitive_desc
 Primitive descriptor for a convolution backward propagation primitive. More...
 
struct  dnnl::convolution_backward_weights
 Convolution weights gradient primitive. More...
 
struct  dnnl::convolution_backward_weights::desc
 Descriptor for a convolution weights gradient primitive. More...
 
struct  dnnl::convolution_backward_weights::primitive_desc
 Primitive descriptor for a convolution weights gradient primitive. More...
 
struct  dnnl::deconvolution_forward
 Deconvolution forward propagation primitive. More...
 
struct  dnnl::deconvolution_forward::desc
 Descriptor for a deconvolution forward propagation primitive. More...
 
struct  dnnl::deconvolution_forward::primitive_desc
 Primitive descriptor for a deconvolution forward propagation primitive. More...
 
struct  dnnl::deconvolution_backward_data
 Deconvolution backward propagation primitive. More...
 
struct  dnnl::deconvolution_backward_data::desc
 Descriptor for a deconvolution backward propagation primitive. More...
 
struct  dnnl::deconvolution_backward_data::primitive_desc
 Primitive descriptor for a deconvolution backward propagation primitive. More...
 
struct  dnnl::deconvolution_backward_weights
 Deconvolution weights gradient primitive. More...
 
struct  dnnl::deconvolution_backward_weights::desc
 Descriptor for a deconvolution weights gradient primitive. More...
 
struct  dnnl::deconvolution_backward_weights::primitive_desc
 Primitive descriptor for a deconvolution weights gradient primitive. More...
 
struct  dnnl::lrn_forward
 Local response normalization (LRN) forward propagation primitive. More...
 
struct  dnnl::lrn_forward::desc
 Descriptor for an LRN forward propagation primitive. More...
 
struct  dnnl::lrn_forward::primitive_desc
 Primitive descriptor for an LRN forward propagation primitive. More...
 
struct  dnnl::lrn_backward
 Local response normalization (LRN) backward propagation primitive. More...
 
struct  dnnl::lrn_backward::desc
 Descriptor for an LRN backward propagation primitive. More...
 
struct  dnnl::lrn_backward::primitive_desc
 Primitive descriptor for an LRN backward propagation primitive. More...
 
struct  dnnl::pooling_forward
 Pooling forward propagation primitive. More...
 
struct  dnnl::pooling_forward::desc
 Descriptor for a pooling forward propagation primitive. More...
 
struct  dnnl::pooling_forward::primitive_desc
 Primitive descriptor for a pooling forward propagation primitive. More...
 
struct  dnnl::pooling_backward
 Pooling backward propagation primitive. More...
 
struct  dnnl::pooling_backward::desc
 Descriptor for a pooling backward propagation primitive. More...
 
struct  dnnl::pooling_backward::primitive_desc
 Primitive descriptor for a pooling backward propagation primitive. More...
 
struct  dnnl::eltwise_forward
 Elementwise unary operation forward propagation primitive. More...
 
struct  dnnl::eltwise_forward::desc
 Descriptor for an elementwise forward propagation primitive. More...
 
struct  dnnl::eltwise_forward::primitive_desc
 Primitive descriptor for an elementwise forward propagation primitive. More...
 
struct  dnnl::eltwise_backward
 Elementwise unary operation backward propagation primitive. More...
 
struct  dnnl::eltwise_backward::desc
 Descriptor for an elementwise backward propagation primitive. More...
 
struct  dnnl::eltwise_backward::primitive_desc
 Primitive descriptor for eltwise backward propagation. More...
 
struct  dnnl::softmax_forward
 Softmax forward propagation primitive. More...
 
struct  dnnl::softmax_forward::desc
 Descriptor for a softmax forward propagation primitive. More...
 
struct  dnnl::softmax_forward::primitive_desc
 Primitive descriptor for a softmax forward propagation primitive. More...
 
struct  dnnl::softmax_backward
 Softmax backward propagation primitive. More...
 
struct  dnnl::softmax_backward::desc
 Descriptor for a softmax backward propagation primitive. More...
 
struct  dnnl::softmax_backward::primitive_desc
 Primitive descriptor for a softmax backward propagation primitive. More...
 
struct  dnnl::logsoftmax_forward
 Logsoftmax forward propagation primitive. More...
 
struct  dnnl::logsoftmax_forward::desc
 Descriptor for a logsoftmax forward propagation primitive. More...
 
struct  dnnl::logsoftmax_forward::primitive_desc
 Primitive descriptor for a logsoftmax forward propagation primitive. More...
 
struct  dnnl::logsoftmax_backward
 Logsoftmax backward propagation primitive. More...
 
struct  dnnl::logsoftmax_backward::desc
 Descriptor for a logsoftmax backward propagation primitive. More...
 
struct  dnnl::logsoftmax_backward::primitive_desc
 Primitive descriptor for a logsoftmax backward propagation primitive. More...
 
struct  dnnl::batch_normalization_forward
 Batch normalization forward propagation primitive. More...
 
struct  dnnl::batch_normalization_forward::desc
 Descriptor for a batch normalization forward propagation primitive. More...
 
struct  dnnl::batch_normalization_forward::primitive_desc
 Primitive descriptor for a batch normalization forward propagation primitive. More...
 
struct  dnnl::batch_normalization_backward
 Batch normalization backward propagation primitive. More...
 
struct  dnnl::batch_normalization_backward::desc
 Descriptor for a batch normalization backward propagation primitive. More...
 
struct  dnnl::batch_normalization_backward::primitive_desc
 Primitive descriptor for a batch normalization backward propagation primitive. More...
 
struct  dnnl::layer_normalization_forward
 Layer normalization forward propagation primitive. More...
 
struct  dnnl::layer_normalization_forward::desc
 Descriptor for a layer normalization forward propagation primitive. More...
 
struct  dnnl::layer_normalization_forward::primitive_desc
 Primitive descriptor for a layer normalization forward propagation primitive. More...
 
struct  dnnl::layer_normalization_backward
 Layer normalization backward propagation primitive. More...
 
struct  dnnl::layer_normalization_backward::desc
 Descriptor for a layer normalization backward propagation primitive. More...
 
struct  dnnl::layer_normalization_backward::primitive_desc
 Primitive descriptor for a layer normalization backward propagation primitive. More...
 
struct  dnnl::inner_product_forward
 Inner product forward propagation primitive. More...
 
struct  dnnl::inner_product_forward::desc
 Descriptor for an inner product forward propagation primitive. More...
 
struct  dnnl::inner_product_forward::primitive_desc
 Primitive descriptor for an inner product forward propagation primitive. More...
 
struct  dnnl::inner_product_backward_data
 Inner product backward propagation primitive. More...
 
struct  dnnl::inner_product_backward_data::desc
 Descriptor for an inner product backward propagation primitive. More...
 
struct  dnnl::inner_product_backward_data::primitive_desc
 Primitive descriptor for an inner product backward propagation primitive. More...
 
struct  dnnl::inner_product_backward_weights
 Inner product weights gradient primitive. More...
 
struct  dnnl::inner_product_backward_weights::desc
 Descriptor for an inner product weights gradient primitive. More...
 
struct  dnnl::inner_product_backward_weights::primitive_desc
 Primitive descriptor for an inner product weights gradient primitive. More...
 
struct  dnnl::rnn_primitive_desc_base
 Base class for primitive descriptors for RNN primitives. More...
 
struct  dnnl::vanilla_rnn_forward
 Vanilla RNN forward propagation primitive. More...
 
struct  dnnl::vanilla_rnn_forward::desc
 Descriptor for a vanilla RNN forward propagation primitive. More...
 
struct  dnnl::vanilla_rnn_forward::primitive_desc
 Primitive descriptor for a vanilla RNN forward propagation primitive. More...
 
struct  dnnl::vanilla_rnn_backward
 Vanilla RNN backward propagation primitive. More...
 
struct  dnnl::vanilla_rnn_backward::desc
 Descriptor for a vanilla RNN backward propagation primitive. More...
 
struct  dnnl::vanilla_rnn_backward::primitive_desc
 Primitive descriptor for an RNN backward propagation primitive. More...
 
struct  dnnl::lstm_forward
 LSTM forward propagation primitive. More...
 
struct  dnnl::lstm_forward::desc
 Descriptor for an LSTM forward propagation primitive. More...
 
struct  dnnl::lstm_forward::primitive_desc
 Primitive descriptor for an LSTM forward propagation primitive. More...
 
struct  dnnl::lstm_backward
 LSTM backward propagation primitive. More...
 
struct  dnnl::lstm_backward::desc
 Descriptor for an LSTM backward propagation primitive. More...
 
struct  dnnl::lstm_backward::primitive_desc
 Primitive descriptor for an LSTM backward propagation primitive. More...
 
struct  dnnl::gru_forward
 GRU forward propagation primitive. More...
 
struct  dnnl::gru_forward::desc
 Descriptor for a GRU forward propagation primitive. More...
 
struct  dnnl::gru_forward::primitive_desc
 Primitive descriptor for a GRU forward propagation primitive. More...
 
struct  dnnl::gru_backward
 GRU backward propagation primitive. More...
 
struct  dnnl::gru_backward::desc
 Descriptor for a GRU backward propagation primitive. More...
 
struct  dnnl::gru_backward::primitive_desc
 Primitive descriptor for a GRU backward propagation primitive. More...
 
struct  dnnl::lbr_gru_forward
 LBR GRU forward propagation primitive. More...
 
struct  dnnl::lbr_gru_forward::desc
 Descriptor for an LBR GRU forward propagation primitive. More...
 
struct  dnnl::lbr_gru_forward::primitive_desc
 Primitive descriptor for an LBR GRU forward propagation primitive. More...
 
struct  dnnl::lbr_gru_backward
 LBR GRU backward propagation primitive. More...
 
struct  dnnl::lbr_gru_backward::desc
 Descriptor for a LBR GRU backward propagation primitive. More...
 
struct  dnnl::lbr_gru_backward::primitive_desc
 Primitive descriptor for an LBR GRU backward propagation primitive. More...
 
struct  dnnl::shuffle_forward
 Shuffle forward propagation primitive. More...
 
struct  dnnl::shuffle_forward::desc
 Descriptor for a shuffle forward propagation primitive. More...
 
struct  dnnl::shuffle_forward::primitive_desc
 Primitive descriptor for a shuffle forward propagation primitive. More...
 
struct  dnnl::shuffle_backward
 Shuffle backward propagation primitive. More...
 
struct  dnnl::shuffle_backward::desc
 Descriptor for a shuffle primitive backward propagation primitive. More...
 
struct  dnnl::shuffle_backward::primitive_desc
 Primitive descriptor for a shuffle backward propagation primitive. More...
 
struct  dnnl::binary
 Elementwise binary operator primitive. More...
 
struct  dnnl::binary::desc
 Descriptor for an elementwise binary operator primitive. More...
 
struct  dnnl::binary::primitive_desc
 Primitive descriptor for an elementwise binary operator primitive. More...
 
struct  dnnl::matmul
 Matrix multiplication (matmul) primitive. More...
 
struct  dnnl::matmul::desc
 Descriptor for a matmul primitive. More...
 
struct  dnnl::matmul::primitive_desc
 Primitive descriptor for a matmul primitive. More...
 
struct  dnnl::resampling_forward
 Resampling forward propagation. More...
 
struct  dnnl::resampling_forward::desc
 Descriptor for resampling forward propagation. More...
 
struct  dnnl::resampling_forward::primitive_desc
 Primitive descriptor for a resampling forward propagation primitive. More...
 
struct  dnnl::resampling_backward
 Resampling backward propagation primitive. More...
 
struct  dnnl::resampling_backward::desc
 Descriptor for a resampling backward propagation primitive. More...
 
struct  dnnl::resampling_backward::primitive_desc
 Primitive descriptor for resampling backward propagation primitive. More...
 
struct  dnnl::pooling_v2_forward
 Pooling v2 (dilated pooling) forward propagation primitive. More...
 
struct  dnnl::pooling_v2_forward::desc
 Descriptor for a pooling forward propagation primitive. More...
 
struct  dnnl::pooling_v2_forward::primitive_desc
 Primitive descriptor for a pooling forward propagation primitive. More...
 
struct  dnnl::pooling_v2_backward
 Pooling v2 (dilated pooling) backward propagation primitive. More...
 
struct  dnnl::pooling_v2_backward::desc
 Descriptor for a pooling backward propagation primitive. More...
 
struct  dnnl::pooling_v2_backward::primitive_desc
 Primitive descriptor for a pooling v2 (dilated pooling) backward propagation primitive. More...
 
struct  dnnl::prelu_forward
 PReLU forward propagation primitive. More...
 
struct  dnnl::prelu_forward::desc
 Descriptor for a PReLU forward propagation primitive. More...
 
struct  dnnl::prelu_forward::primitive_desc
 Primitive descriptor for a PReLU forward propagation primitive. More...
 
struct  dnnl::prelu_backward
 PReLU backward propagation primitive. More...
 
struct  dnnl::prelu_backward::desc
 Descriptor for a PReLU backward propagation primitive. More...
 
struct  dnnl::prelu_backward::primitive_desc
 Primitive descriptor for prelu backward propagation. More...
 
struct  dnnl::reduction
 Reduction. More...
 
struct  dnnl::reduction::desc
 Descriptor for reduction. More...
 
struct  dnnl::reduction::primitive_desc
 Primitive descriptor for a reduction primitive. More...
 

Namespaces

 dnnl
 oneDNN namespace
 
 oneapi
 oneAPI namespace
 

Typedefs

using dnnl::version_t = dnnl_version_t
 Structure containing version information as per Semantic Versioning More...
 

Enumerations

enum  dnnl::scratchpad_mode
 Scratchpad mode. More...
 
enum  dnnl::prop_kind
 Propagation kind. More...
 
enum  dnnl::algorithm
 Kinds of algorithms. More...
 
enum  dnnl::normalization_flags : unsigned
 Flags for normalization primitives. More...
 
enum  dnnl::rnn_flags : unsigned
 RNN cell flags. More...
 
enum  dnnl::rnn_direction
 A direction of RNN primitive execution. More...
 
enum  dnnl::query
 Primitive descriptor query specification. More...
 
enum  dnnl::status
 Status values returned by the library functions. More...
 
enum  dnnl::cpu_isa
 CPU instruction set flags. More...
 

Functions

dnnl_primitive_kind_t dnnl::convert_to_c (primitive::kind akind)
 Converts primitive kind enum value from C++ API to C API type. More...
 
dnnl_scratchpad_mode_t dnnl::convert_to_c (scratchpad_mode mode)
 Converts a scratchpad mode enum value from C++ API to C API type. More...
 
dnnl_prop_kind_t dnnl::convert_to_c (prop_kind akind)
 Converts propagation kind enum value from C++ API to C API type. More...
 
dnnl_alg_kind_t dnnl::convert_to_c (algorithm aalgorithm)
 Converts algorithm kind enum value from C++ API to C API type. More...
 
dnnl_normalization_flags_t dnnl::convert_to_c (normalization_flags flags)
 Converts normalization flags enum value from C++ API to C API type. More...
 
dnnl_rnn_flags_t dnnl::convert_to_c (rnn_flags flags)
 Converts RNN cell flags enum value from C++ API to C API type. More...
 
dnnl_rnn_direction_t dnnl::convert_to_c (rnn_direction dir)
 Converts RNN direction enum value from C++ API to C API type. More...
 
dnnl_query_t dnnl::convert_to_c (query aquery)
 Converts query enum value from C++ API to C API type. More...
 
dnnl_engine_kind_t dnnl::convert_to_c (engine::kind akind)
 Converts engine kind enum value from C++ API to C API type. More...
 
status dnnl::set_verbose (int level)
 Configures verbose output to stdout. More...
 
const version_t * dnnl::version ()
 Returns library version information. More...
 
status dnnl::set_jit_dump (int enable)
 Configures dumping of JIT-generated code. More...
 
status dnnl::set_jit_profiling_flags (unsigned flags)
 Sets library profiling flags. More...
 
status dnnl::set_jit_profiling_jitdumpdir (const std::string &dir)
 Sets JIT dump output path. More...
 
status dnnl::set_max_cpu_isa (cpu_isa isa)
 Sets the maximal ISA the library can dispatch to on the CPU. More...
 
cpu_isa dnnl::get_effective_cpu_isa ()
 Gets the maximal ISA the library can dispatch to on the CPU. More...
 
int dnnl::get_primitive_cache_capacity ()
 Returns the number of primitives that can be held in the primitive cache at the same time. More...
 
void dnnl::set_primitive_cache_capacity (int capacity)
 Sets a number of primitives that can be held in the primitive cache at a time. More...
 
status dnnl::sgemm (char transa, char transb, dnnl_dim_t M, dnnl_dim_t N, dnnl_dim_t K, float alpha, const float *A, dnnl_dim_t lda, const float *B, dnnl_dim_t ldb, float beta, float *C, dnnl_dim_t ldc)
 Performs single-precision matrix-matrix multiply. More...
 
status dnnl::gemm_u8s8s32 (char transa, char transb, char offsetc, dnnl_dim_t M, dnnl_dim_t N, dnnl_dim_t K, float alpha, const uint8_t *A, dnnl_dim_t lda, uint8_t ao, const int8_t *B, dnnl_dim_t ldb, int8_t bo, float beta, int32_t *C, dnnl_dim_t ldc, const int32_t *co)
 Performs integer matrix-matrix multiply on 8-bit unsigned matrix A, 8-bit signed matrix B, and 32-bit signed resulting matrix C. More...
 
status dnnl::gemm_s8s8s32 (char transa, char transb, char offsetc, dnnl_dim_t M, dnnl_dim_t N, dnnl_dim_t K, float alpha, const int8_t *A, dnnl_dim_t lda, int8_t ao, const int8_t *B, dnnl_dim_t ldb, int8_t bo, float beta, int32_t *C, dnnl_dim_t ldc, const int32_t *co)
 Performs integer matrix-matrix multiply on 8-bit signed matrix A, 8-bit signed matrix B, and 32-bit signed resulting matrix C. More...
 

Detailed Description

C++ API.