oneAPI Deep Neural Network Library (oneDNN)
Performance library for Deep Learning
1.96.0
Matrix Multiplication

A primitive to perform matrix-matrix multiplication. More...

Classes

struct  dnnl::matmul
 Matrix multiplication (matmul) primitive. More...
 
struct  dnnl_matmul_desc_t
 A descriptor of a matrix multiplication operation. More...
 

Functions

dnnl_status_t DNNL_API dnnl_matmul_desc_init (dnnl_matmul_desc_t *matmul_desc, const dnnl_memory_desc_t *src_desc, const dnnl_memory_desc_t *weights_desc, const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_desc)
 Initializes a matrix multiplication descriptor. More...
 

Detailed Description

A primitive to perform matrix-matrix multiplication.

The batched mode is supported with 3D tensors.

See also
Matrix Multiplication in developer guide

Function Documentation

◆ dnnl_matmul_desc_init()

dnnl_status_t DNNL_API dnnl_matmul_desc_init ( dnnl_matmul_desc_t matmul_desc,
const dnnl_memory_desc_t src_desc,
const dnnl_memory_desc_t weights_desc,
const dnnl_memory_desc_t bias_desc,
const dnnl_memory_desc_t dst_desc 
)

Initializes a matrix multiplication descriptor.

Parameters
matmul_descOutput descriptor for matmul primitive.
src_descSource memory descriptor (matrix A)
weights_descWeights memory descriptor (matrix B)
bias_descBias memory descriptor. Passing NULL, a zero memory descriptor, or a memory descriptor with format_kind set to dnnl_format_kind_undef disables the bias term.
dst_descDestination memory descriptor (matrix C).
Returns
dnnl_success on success and a status describing the error otherwise.