.. index:: pair: group; Matrix Multiplication .. _doxid-group__dnnl__api__matmul: Matrix Multiplication ===================== .. toctree:: :hidden: struct_dnnl_matmul.rst Overview ~~~~~~~~ A primitive to perform matrix-matrix multiplication. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block // structs struct :ref:`dnnl::matmul`; // global functions :ref:`dnnl_status_t` DNNL_API :ref:`dnnl_matmul_primitive_desc_create`( :ref:`dnnl_primitive_desc_t`* primitive_desc, :ref:`dnnl_engine_t` engine, :ref:`const_dnnl_memory_desc_t` src_desc, :ref:`const_dnnl_memory_desc_t` weights_desc, :ref:`const_dnnl_memory_desc_t` bias_desc, :ref:`const_dnnl_memory_desc_t` dst_desc, :ref:`const_dnnl_primitive_attr_t` attr ); .. _details-group__dnnl__api__matmul: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ A primitive to perform matrix-matrix multiplication. The batched mode is supported with 3D tensors. .. rubric:: See also: :ref:`Matrix Multiplication ` in developer guide Global Functions ---------------- .. index:: pair: function; dnnl_matmul_primitive_desc_create .. _doxid-group__dnnl__api__matmul_1gaac0ca3eed6070331c7d4020028b00fe6: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_status_t` DNNL_API dnnl_matmul_primitive_desc_create( :ref:`dnnl_primitive_desc_t`* primitive_desc, :ref:`dnnl_engine_t` engine, :ref:`const_dnnl_memory_desc_t` src_desc, :ref:`const_dnnl_memory_desc_t` weights_desc, :ref:`const_dnnl_memory_desc_t` bias_desc, :ref:`const_dnnl_memory_desc_t` dst_desc, :ref:`const_dnnl_primitive_attr_t` attr ) Creates a primitive descriptor for a matrix multiplication primitive. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - primitive_desc - Output primitive descriptor. * - engine - Engine to use. * - src_desc - Source memory descriptor (matrix A) * - weights_desc - Weights memory descriptor (matrix B) * - bias_desc - Bias memory descriptor. Passing NULL, a zero memory descriptor, or a memory descriptor with format_kind set to :ref:`dnnl_format_kind_undef ` disables the bias term. * - dst_desc - Destination memory descriptor (matrix C). * - attr - Primitive attributes (can be NULL). .. rubric:: Returns: :ref:`dnnl_success ` on success and a status describing the error otherwise.