oneAPI Deep Neural Network Library (oneDNN)
Performance library for Deep Learning
1.96.0
dnnl::rnn_primitive_desc_base Struct Reference

Base class for primitive descriptors for RNN primitives. More...

#include <dnnl.hpp>

Inheritance diagram for dnnl::rnn_primitive_desc_base:
Collaboration diagram for dnnl::rnn_primitive_desc_base:

Public Member Functions

 rnn_primitive_desc_base ()=default
 Default constructor. Produces an empty object.
 
 rnn_primitive_desc_base (dnnl_primitive_desc_t pd, dnnl::prop_kind aprop_kind, dnnl::algorithm cell_kind)
 Constructs an RNN primitive descriptor base from a C API primitive descriptor while checking that it actually describes the expected primitive by comparing propagation and primitive kinds. More...
 
memory::desc src_layer_desc () const
 Returns source layer memory descriptor. More...
 
memory::desc src_iter_desc () const
 Returns source iteration memory descriptor. More...
 
memory::desc src_iter_c_desc () const
 Returns source recurrent cell state memory descriptor. More...
 
memory::desc weights_layer_desc () const
 Returns weights layer memory descriptor. More...
 
memory::desc weights_iter_desc () const
 Returns weights iteration memory descriptor. More...
 
memory::desc weights_peephole_desc () const
 Returns weights peephole memory descriptor. More...
 
memory::desc weights_projection_desc () const
 Returns weights projection memory descriptor. More...
 
memory::desc bias_desc () const
 Returns bias memory descriptor. More...
 
memory::desc dst_layer_desc () const
 Returns destination layer memory descriptor. More...
 
memory::desc dst_iter_desc () const
 Returns destination iteration memory descriptor. More...
 
memory::desc dst_iter_c_desc () const
 Returns destination recurrent cell state memory descriptor. More...
 
memory::desc diff_src_layer_desc () const
 Returns diff source layer memory descriptor. More...
 
memory::desc diff_src_iter_desc () const
 Returns diff source iteration memory descriptor. More...
 
memory::desc diff_src_iter_c_desc () const
 Returns diff source recurrent cell state memory descriptor. More...
 
memory::desc diff_weights_layer_desc () const
 Returns diff weights layer memory descriptor. More...
 
memory::desc diff_weights_iter_desc () const
 Returns diff weights iteration memory descriptor. More...
 
memory::desc diff_weights_peephole_desc () const
 Returns diff weights peephole memory descriptor. More...
 
memory::desc diff_weights_projection_desc () const
 Returns diff weights projection memory descriptor. More...
 
memory::desc diff_bias_desc () const
 Returns diff bias memory descriptor. More...
 
memory::desc diff_dst_layer_desc () const
 Returns diff destination layer memory descriptor. More...
 
memory::desc diff_dst_iter_desc () const
 Returns diff destination iteration memory descriptor. More...
 
memory::desc diff_dst_iter_c_desc () const
 Returns diff destination recurrent cell state memory descriptor. More...
 
 primitive_desc (const_dnnl_op_desc_t desc, const primitive_attr *attr, const engine &aengine, const_dnnl_primitive_desc_t hint_fwd_pd, bool allow_empty=false)
 Constructs a primitive descriptor. More...
 
- Public Member Functions inherited from dnnl::primitive_desc
 primitive_desc (const_dnnl_op_desc_t desc, const primitive_attr *attr, const engine &aengine, const_dnnl_primitive_desc_t hint_fwd_pd, bool allow_empty=false)
 Constructs a primitive descriptor. More...
 
bool next_impl ()
 Advances the primitive iterator to the next implementation. More...
 
 primitive_desc_base ()=default
 Default constructor. Produces an empty object.
 
 primitive_desc_base (dnnl_primitive_desc_t pd, dnnl::primitive::kind prim_kind)
 Constructs a primitive descriptor base object from a clone of a C API primitive descriptor after verifying that it is what the caller expects. More...
 
 primitive_desc_base (dnnl_primitive_desc_t pd, dnnl::primitive::kind prim_kind, dnnl::prop_kind aprop_kind)
 Constructs a primitive descriptor base object from a clone of a C API primitive descriptor after verifying that it is what the caller expects. More...
 
 primitive_desc_base (dnnl_primitive_desc_t pd, dnnl::primitive::kind prim_kind, dnnl::prop_kind prop_kind1, dnnl::prop_kind prop_kind2)
 Constructs a primitive descriptor base object from a clone of a C API primitive descriptor after verifying that it is what the caller expects. More...
 
- Public Member Functions inherited from dnnl::primitive_desc_base
 primitive_desc_base ()=default
 Default constructor. Produces an empty object.
 
engine get_engine () const
 Returns the engine of the primitive descriptor. More...
 
const char * impl_info_str () const
 Returns implementation name. More...
 
memory::dim query_s64 (query what) const
 Returns a memory::dim value (same as int64_t). More...
 
memory::desc query_md (query what, int idx=0) const
 Returns a memory descriptor. More...
 
memory::desc src_desc (int idx) const
 Returns a source memory descriptor. More...
 
memory::desc dst_desc (int idx) const
 Returns a destination memory descriptor. More...
 
memory::desc weights_desc (int idx) const
 Returns a weights memory descriptor. More...
 
memory::desc diff_src_desc (int idx) const
 Returns a diff source memory descriptor. More...
 
memory::desc diff_dst_desc (int idx) const
 Returns a diff destination memory descriptor. More...
 
memory::desc diff_weights_desc (int idx) const
 Returns a diff weights memory descriptor. More...
 
memory::desc src_desc () const
 Returns a source memory descriptor. More...
 
memory::desc dst_desc () const
 Returns a destination memory descriptor. More...
 
memory::desc weights_desc () const
 Returns a weights memory descriptor. More...
 
memory::desc diff_src_desc () const
 Returns a diff source memory descriptor. More...
 
memory::desc diff_dst_desc () const
 Returns a diff destination memory descriptor. More...
 
memory::desc diff_weights_desc () const
 Returns a diff weights memory descriptor. More...
 
memory::desc workspace_desc () const
 Returns the workspace memory descriptor. More...
 
memory::desc scratchpad_desc () const
 Returns the scratchpad memory descriptor. More...
 
engine scratchpad_engine () const
 Returns the engine on which the scratchpad memory is located. More...
 
primitive_attr get_primitive_attr () const
 Returns the primitive attributes. More...
 
dnnl::primitive::kind get_kind () const
 Returns the kind of the primitive descriptor. More...
 
- Public Member Functions inherited from dnnl::handle< dnnl_primitive_desc_t >
bool operator== (const handle< dnnl_primitive_desc_t, handle_traits< dnnl_primitive_desc_t > > &other) const
 Equality operator. More...
 
bool operator!= (const handle &other) const
 Inequality operator. More...
 
 handle ()=default
 Constructs an empty handle object. More...
 
 handle (const handle< dnnl_primitive_desc_t, handle_traits< dnnl_primitive_desc_t > > &)=default
 Copy constructor.
 
 handle (handle< dnnl_primitive_desc_t, handle_traits< dnnl_primitive_desc_t > > &&)=default
 Move constructor.
 
 handle (dnnl_primitive_desc_t t, bool weak=false)
 Constructs a handle wrapper object from a C API handle. More...
 
handle< dnnl_primitive_desc_t, handle_traits< dnnl_primitive_desc_t > > & operator= (const handle< dnnl_primitive_desc_t, handle_traits< dnnl_primitive_desc_t > > &)=default
 Assignment operator.
 
handle< dnnl_primitive_desc_t, handle_traits< dnnl_primitive_desc_t > > & operator= (handle< dnnl_primitive_desc_t, handle_traits< dnnl_primitive_desc_t > > &&)=default
 Move assignment operator.
 
void reset (dnnl_primitive_desc_t t, bool weak=false)
 Resets the handle wrapper objects to wrap a new C API handle. More...
 
dnnl_primitive_desc_t get (bool allow_empty=false) const
 Returns the underlying C API handle. More...
 
 operator dnnl_primitive_desc_t () const
 Converts a handle to the underlying C API handle type. More...
 
 operator bool () const
 Checks whether the object is not empty. More...
 

Additional Inherited Members

- Protected Member Functions inherited from dnnl::primitive_desc_base
void reset_with_clone (const_dnnl_primitive_desc_t pd)
 Resets the value of the handle to a clone of a C API primitive descriptor. More...
 
 primitive_desc_base (dnnl_primitive_desc_t pd, dnnl::primitive::kind prim_kind)
 Constructs a primitive descriptor base object from a clone of a C API primitive descriptor after verifying that it is what the caller expects. More...
 
 primitive_desc_base (dnnl_primitive_desc_t pd, dnnl::primitive::kind prim_kind, dnnl::prop_kind aprop_kind)
 Constructs a primitive descriptor base object from a clone of a C API primitive descriptor after verifying that it is what the caller expects. More...
 
 primitive_desc_base (dnnl_primitive_desc_t pd, dnnl::primitive::kind prim_kind, dnnl::prop_kind prop_kind1, dnnl::prop_kind prop_kind2)
 Constructs a primitive descriptor base object from a clone of a C API primitive descriptor after verifying that it is what the caller expects. More...
 

Detailed Description

Base class for primitive descriptors for RNN primitives.

Constructor & Destructor Documentation

◆ rnn_primitive_desc_base()

dnnl::rnn_primitive_desc_base::rnn_primitive_desc_base ( dnnl_primitive_desc_t  pd,
dnnl::prop_kind  aprop_kind,
dnnl::algorithm  cell_kind 
)
inline

Constructs an RNN primitive descriptor base from a C API primitive descriptor while checking that it actually describes the expected primitive by comparing propagation and primitive kinds.

Parameters
pdC API primitive descriptor.
aprop_kindExpected propagation kind.
cell_kindExpected cell kind.

Member Function Documentation

◆ src_layer_desc()

memory::desc dnnl::rnn_primitive_desc_base::src_layer_desc ( ) const
inline

Returns source layer memory descriptor.

Returns
Source layer memory descriptor.

◆ src_iter_desc()

memory::desc dnnl::rnn_primitive_desc_base::src_iter_desc ( ) const
inline

Returns source iteration memory descriptor.

Returns
Source iteration memory descriptor.
A zero memory descriptor if the primitive does not have a source iteration parameter.

◆ src_iter_c_desc()

memory::desc dnnl::rnn_primitive_desc_base::src_iter_c_desc ( ) const
inline

Returns source recurrent cell state memory descriptor.

Returns
Source recurrent cell state memory descriptor.

◆ weights_layer_desc()

memory::desc dnnl::rnn_primitive_desc_base::weights_layer_desc ( ) const
inline

Returns weights layer memory descriptor.

Returns
Weights layer memory descriptor.

◆ weights_iter_desc()

memory::desc dnnl::rnn_primitive_desc_base::weights_iter_desc ( ) const
inline

Returns weights iteration memory descriptor.

Returns
Weights iteration memory descriptor.

◆ weights_peephole_desc()

memory::desc dnnl::rnn_primitive_desc_base::weights_peephole_desc ( ) const
inline

Returns weights peephole memory descriptor.

Returns
Weights peephole memory descriptor.

◆ weights_projection_desc()

memory::desc dnnl::rnn_primitive_desc_base::weights_projection_desc ( ) const
inline

Returns weights projection memory descriptor.

Returns
Weights projection memory descriptor.

◆ bias_desc()

memory::desc dnnl::rnn_primitive_desc_base::bias_desc ( ) const
inline

Returns bias memory descriptor.

Returns
Bias memory descriptor.
A zero memory descriptor if the primitive does not have a bias parameter.

◆ dst_layer_desc()

memory::desc dnnl::rnn_primitive_desc_base::dst_layer_desc ( ) const
inline

Returns destination layer memory descriptor.

Returns
Destination layer memory descriptor.

◆ dst_iter_desc()

memory::desc dnnl::rnn_primitive_desc_base::dst_iter_desc ( ) const
inline

Returns destination iteration memory descriptor.

Returns
Destination iteration memory descriptor.
A zero memory descriptor if the primitive does not have a destination iteration parameter.

◆ dst_iter_c_desc()

memory::desc dnnl::rnn_primitive_desc_base::dst_iter_c_desc ( ) const
inline

Returns destination recurrent cell state memory descriptor.

Returns
Destination recurrent cell state memory descriptor.

◆ diff_src_layer_desc()

memory::desc dnnl::rnn_primitive_desc_base::diff_src_layer_desc ( ) const
inline

Returns diff source layer memory descriptor.

Returns
Diff source layer memory descriptor.

◆ diff_src_iter_desc()

memory::desc dnnl::rnn_primitive_desc_base::diff_src_iter_desc ( ) const
inline

Returns diff source iteration memory descriptor.

Returns
Diff source iteration memory descriptor.
A zero memory descriptor if the primitive does not have a diff source iteration parameter.

◆ diff_src_iter_c_desc()

memory::desc dnnl::rnn_primitive_desc_base::diff_src_iter_c_desc ( ) const
inline

Returns diff source recurrent cell state memory descriptor.

Returns
Diff source recurrent cell state memory descriptor.

◆ diff_weights_layer_desc()

memory::desc dnnl::rnn_primitive_desc_base::diff_weights_layer_desc ( ) const
inline

Returns diff weights layer memory descriptor.

Returns
Diff weights layer memory descriptor.

◆ diff_weights_iter_desc()

memory::desc dnnl::rnn_primitive_desc_base::diff_weights_iter_desc ( ) const
inline

Returns diff weights iteration memory descriptor.

Returns
Diff weights iteration memory descriptor.

◆ diff_weights_peephole_desc()

memory::desc dnnl::rnn_primitive_desc_base::diff_weights_peephole_desc ( ) const
inline

Returns diff weights peephole memory descriptor.

Returns
Diff weights peephole memory descriptor.

◆ diff_weights_projection_desc()

memory::desc dnnl::rnn_primitive_desc_base::diff_weights_projection_desc ( ) const
inline

Returns diff weights projection memory descriptor.

Returns
Diff weights projection memory descriptor.

◆ diff_bias_desc()

memory::desc dnnl::rnn_primitive_desc_base::diff_bias_desc ( ) const
inline

Returns diff bias memory descriptor.

Returns
Diff bias memory descriptor.
A zero memory descriptor if the primitive does not have a diff bias parameter.

◆ diff_dst_layer_desc()

memory::desc dnnl::rnn_primitive_desc_base::diff_dst_layer_desc ( ) const
inline

Returns diff destination layer memory descriptor.

Returns
Diff destination layer memory descriptor.

◆ diff_dst_iter_desc()

memory::desc dnnl::rnn_primitive_desc_base::diff_dst_iter_desc ( ) const
inline

Returns diff destination iteration memory descriptor.

Returns
Diff destination iteration memory descriptor.
A zero memory descriptor if the primitive does not have a diff destination iteration parameter.

◆ diff_dst_iter_c_desc()

memory::desc dnnl::rnn_primitive_desc_base::diff_dst_iter_c_desc ( ) const
inline

Returns diff destination recurrent cell state memory descriptor.

Returns
Diff destination recurrent cell state memory descriptor.

◆ primitive_desc()

dnnl::primitive_desc::primitive_desc
inline

Constructs a primitive descriptor.

Note
If allow_empty is true, the constructor does not throw if a primitive descriptor cannot be created. But calling next_impl() in this case will throw.
This is a low-level implementation detail that is typically not needed in application code.
Parameters
descConstant C API operation descriptor.
attrPointer to primitive attributes. It is safe to pass nullptr to indicate absence of attributes.
aengineEngine to use.
hint_fwd_pdC API primitive descriptor for a forward propagation primitive. It is used as a hint for deciding which memory format to use for backward propagation or weights gradient.
allow_emptyA flag signifying whether construction is allowed to fail without throwing an exception. In this case an empty object will be produced. This flag is optional and defaults to false.

The documentation for this struct was generated from the following file: