.. index:: pair: group; Inner Product .. _doxid-group__dnnl__api__inner__product: Inner Product ============= .. toctree:: :hidden: struct_dnnl_inner_product_backward_data.rst struct_dnnl_inner_product_backward_weights.rst struct_dnnl_inner_product_forward.rst Overview ~~~~~~~~ A primitive to compute an inner product. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block // structs struct :ref:`dnnl::inner_product_backward_data`; struct :ref:`dnnl::inner_product_backward_weights`; struct :ref:`dnnl::inner_product_forward`; // global functions :ref:`dnnl_status_t` DNNL_API :ref:`dnnl_inner_product_forward_primitive_desc_create`( :ref:`dnnl_primitive_desc_t`* primitive_desc, :ref:`dnnl_engine_t` engine, :ref:`dnnl_prop_kind_t` prop_kind, :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 ); :ref:`dnnl_status_t` DNNL_API :ref:`dnnl_inner_product_backward_data_primitive_desc_create`( :ref:`dnnl_primitive_desc_t`* primitive_desc, :ref:`dnnl_engine_t` engine, :ref:`const_dnnl_memory_desc_t` diff_src_desc, :ref:`const_dnnl_memory_desc_t` weights_desc, :ref:`const_dnnl_memory_desc_t` diff_dst_desc, :ref:`const_dnnl_primitive_desc_t` hint_fwd_pd, :ref:`const_dnnl_primitive_attr_t` attr ); :ref:`dnnl_status_t` DNNL_API :ref:`dnnl_inner_product_backward_weights_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` diff_weights_desc, :ref:`const_dnnl_memory_desc_t` diff_bias_desc, :ref:`const_dnnl_memory_desc_t` diff_dst_desc, :ref:`const_dnnl_primitive_desc_t` hint_fwd_pd, :ref:`const_dnnl_primitive_attr_t` attr ); .. _details-group__dnnl__api__inner__product: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ A primitive to compute an inner product. .. rubric:: See also: :ref:`Inner Product ` in developer guide Global Functions ---------------- .. index:: pair: function; dnnl_inner_product_forward_primitive_desc_create .. _doxid-group__dnnl__api__inner__product_1gad639955af0f0daefd3ea9beda50f7fa8: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_status_t` DNNL_API dnnl_inner_product_forward_primitive_desc_create( :ref:`dnnl_primitive_desc_t`* primitive_desc, :ref:`dnnl_engine_t` engine, :ref:`dnnl_prop_kind_t` prop_kind, :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 an inner product forward propagation primitive. .. note:: Memory descriptors can be initialized with :ref:`dnnl_format_tag_any ` or with format_kind set to :ref:`dnnl_format_kind_any `. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - primitive_desc - Output primitive_descriptor. * - engine - Engine to use. * - prop_kind - Propagation kind. Possible values are :ref:`dnnl_forward_training ` and :ref:`dnnl_forward_inference `. * - src_desc - Source memory descriptor. * - weights_desc - Weights memory descriptor. * - 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. * - attr - Primitive attributes (can be NULL). .. rubric:: Returns: :ref:`dnnl_success ` on success and a status describing the error otherwise. .. index:: pair: function; dnnl_inner_product_backward_data_primitive_desc_create .. _doxid-group__dnnl__api__inner__product_1gadbb37ee1140b71d8d40aa23054b1d2db: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_status_t` DNNL_API dnnl_inner_product_backward_data_primitive_desc_create( :ref:`dnnl_primitive_desc_t`* primitive_desc, :ref:`dnnl_engine_t` engine, :ref:`const_dnnl_memory_desc_t` diff_src_desc, :ref:`const_dnnl_memory_desc_t` weights_desc, :ref:`const_dnnl_memory_desc_t` diff_dst_desc, :ref:`const_dnnl_primitive_desc_t` hint_fwd_pd, :ref:`const_dnnl_primitive_attr_t` attr ) Creates a primitive descriptor for an inner product backward propagation primitive. .. note:: Memory descriptors can be initialized with :ref:`dnnl_format_tag_any ` or with format_kind set to :ref:`dnnl_format_kind_any `. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - primitive_desc - Output primitive_descriptor. * - engine - Engine to use. * - diff_src_desc - Diff source memory descriptor. * - weights_desc - Weights memory descriptor. * - diff_dst_desc - Diff destination memory descriptor. * - hint_fwd_pd - Primitive descriptor for a respective forward propagation primitive. * - attr - Primitive attributes (can be NULL). .. rubric:: Returns: :ref:`dnnl_success ` on success and a status describing the error otherwise. .. index:: pair: function; dnnl_inner_product_backward_weights_primitive_desc_create .. _doxid-group__dnnl__api__inner__product_1ga2924b2a46b5d6e55854b0d785c4f11ae: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_status_t` DNNL_API dnnl_inner_product_backward_weights_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` diff_weights_desc, :ref:`const_dnnl_memory_desc_t` diff_bias_desc, :ref:`const_dnnl_memory_desc_t` diff_dst_desc, :ref:`const_dnnl_primitive_desc_t` hint_fwd_pd, :ref:`const_dnnl_primitive_attr_t` attr ) Creates a primitive descriptor for an inner product weights gradient primitive. .. note:: Memory descriptors can be initialized with :ref:`dnnl_format_tag_any ` or with format_kind set to :ref:`dnnl_format_kind_any `. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - primitive_desc - Output primitive_descriptor. * - engine - Engine to use. * - src_desc - Source memory descriptor. * - diff_weights_desc - Diff weights memory descriptor. * - diff_bias_desc - Diff 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. * - diff_dst_desc - Diff destination memory descriptor. * - hint_fwd_pd - Primitive descriptor for a respective forward propagation primitive. * - attr - Primitive attributes (can be NULL). .. rubric:: Returns: :ref:`dnnl_success ` on success and a status describing the error otherwise.