.. index:: pair: group; Shuffle .. _doxid-group__dnnl__api__shuffle: Shuffle ======= .. toctree:: :hidden: struct_dnnl_shuffle_desc_t.rst struct_dnnl_shuffle_backward.rst struct_dnnl_shuffle_forward.rst Overview ~~~~~~~~ A primitive to shuffle tensor data along an axis. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block // structs struct :ref:`dnnl_shuffle_desc_t`; struct :ref:`dnnl::shuffle_backward`; struct :ref:`dnnl::shuffle_forward`; // global functions :ref:`dnnl_status_t` DNNL_API :ref:`dnnl_shuffle_forward_desc_init`( :ref:`dnnl_shuffle_desc_t`* shuffle_desc, :ref:`dnnl_prop_kind_t` prop_kind, const :ref:`dnnl_memory_desc_t`* data_desc, int axis, :ref:`dnnl_dim_t` group_size ); :ref:`dnnl_status_t` DNNL_API :ref:`dnnl_shuffle_backward_desc_init`( :ref:`dnnl_shuffle_desc_t`* shuffle_desc, const :ref:`dnnl_memory_desc_t`* diff_data_desc, int axis, :ref:`dnnl_dim_t` group_size ); .. _details-group__dnnl__api__shuffle: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ A primitive to shuffle tensor data along an axis. .. rubric:: See also: :ref:`Shuffle ` in developer guide Global Functions ---------------- .. index:: pair: function; dnnl_shuffle_forward_desc_init .. _doxid-group__dnnl__api__shuffle_1ga394497dcdf8de4028302170a59763453: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_status_t` DNNL_API dnnl_shuffle_forward_desc_init( :ref:`dnnl_shuffle_desc_t`* shuffle_desc, :ref:`dnnl_prop_kind_t` prop_kind, const :ref:`dnnl_memory_desc_t`* data_desc, int axis, :ref:`dnnl_dim_t` group_size ) Initializes a descriptor for shuffle forward propagation primitive. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - shuffle_desc - Output descriptor for a shuffle primitive. * - prop_kind - Propagation kind. Possible values are :ref:`dnnl_forward_training ` and :ref:`dnnl_forward_inference `. * - data_desc - Source and destination memory descriptor. * - axis - The axis along which the data is shuffled. * - group_size - Shuffle group size. .. rubric:: Returns: :ref:`dnnl_success ` on success and a status describing the error otherwise. .. index:: pair: function; dnnl_shuffle_backward_desc_init .. _doxid-group__dnnl__api__shuffle_1gac9df6d5739e8010e13eff37337c0ddf2: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_status_t` DNNL_API dnnl_shuffle_backward_desc_init( :ref:`dnnl_shuffle_desc_t`* shuffle_desc, const :ref:`dnnl_memory_desc_t`* diff_data_desc, int axis, :ref:`dnnl_dim_t` group_size ) Initializes a descriptor for shuffle backward propagation primitive. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - shuffle_desc - Output descriptor for a shuffle primitive. * - diff_data_desc - Diff source and diff destination memory descriptor. * - axis - The axis along which the data is shuffled. * - group_size - Shuffle group size. .. rubric:: Returns: :ref:`dnnl_success ` on success and a status describing the error otherwise.