struct dnnl_matmul_desc_t

Overview

A descriptor of a matrix multiplication operation. More…

#include <dnnl_types.h>

struct dnnl_matmul_desc_t
{
    // fields

    dnnl_primitive_kind_t primitive_kind;
    dnnl_memory_desc_t src_desc;
    dnnl_memory_desc_t weights_desc;
    dnnl_memory_desc_t bias_desc;
    dnnl_memory_desc_t dst_desc;
    dnnl_data_type_t accum_data_type;
};

Detailed Documentation

A descriptor of a matrix multiplication operation.

2D case: dst[m, n] = src[m, k] * weights[k, n] + bias[m, n]

3D case: dst[mb, m, n] = src[mb, m, k] * weights[mb, k, n] + bias[mb, m, n]

Fields

dnnl_primitive_kind_t primitive_kind

The kind of primitive.

Used for self-identifying the primitive descriptor. Must be dnnl_matmul.

dnnl_memory_desc_t src_desc

Source memory descriptor.

dnnl_memory_desc_t weights_desc

Weights memory descriptor.

dnnl_memory_desc_t bias_desc

Bias memory descriptor.

dnnl_memory_desc_t dst_desc

Destination memory descriptor.

dnnl_data_type_t accum_data_type

The accumulator data type. Initialized automatically.