Developer Guide and Reference

  • 2022.1
  • 04/11/2022
  • Public Content
Contents

struct dnnl::rnn_primitive_desc_base

Overview

Base class for primitive descriptors for RNN primitives. More…
#include <dnnl.hpp> struct rnn_primitive_desc_base: public dnnl::primitive_desc { // construction rnn_primitive_desc_base(); rnn_primitive_desc_base( dnnl_primitive_desc_t pd, dnnl::prop_kind aprop_kind, dnnl::algorithm cell_kind ); // methods memory::desc src_layer_desc() const; memory::desc augru_attention_desc() const; memory::desc src_iter_desc() const; memory::desc src_iter_c_desc() const; memory::desc weights_layer_desc() const; memory::desc weights_iter_desc() const; memory::desc weights_peephole_desc() const; memory::desc weights_projection_desc() const; memory::desc bias_desc() const; memory::desc dst_layer_desc() const; memory::desc dst_iter_desc() const; memory::desc dst_iter_c_desc() const; memory::desc diff_src_layer_desc() const; memory::desc diff_augru_attention_desc() const; memory::desc diff_src_iter_desc() const; memory::desc diff_src_iter_c_desc() const; memory::desc diff_weights_layer_desc() const; memory::desc diff_weights_iter_desc() const; memory::desc diff_weights_peephole_desc() const; memory::desc diff_weights_projection_desc() const; memory::desc diff_bias_desc() const; memory::desc diff_dst_layer_desc() const; memory::desc diff_dst_iter_desc() const; memory::desc diff_dst_iter_c_desc() const; 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 ); }; // direct descendants struct primitive_desc; struct primitive_desc; struct primitive_desc; struct primitive_desc; struct primitive_desc; struct primitive_desc; struct primitive_desc; struct primitive_desc; struct primitive_desc; struct primitive_desc; struct primitive_desc; struct primitive_desc;
Inherited Members
public: // methods handle<T, traits>& operator = (const handle<T, traits>&); handle<T, traits>& operator = (handle<T, traits>&&); void reset(T t, bool weak = false); T get(bool allow_empty = false) const; operator T () const; operator bool () const; bool operator == (const handle<T, traits>& other) const; bool operator != (const handle& other) const; engine get_engine() const; const char* impl_info_str() const; memory::dim query_s64(query what) const; memory::desc query_md(query what, int idx = 0) const; memory::desc src_desc(int idx) const; memory::desc dst_desc(int idx) const; memory::desc weights_desc(int idx) const; memory::desc diff_src_desc(int idx) const; memory::desc diff_dst_desc(int idx) const; memory::desc diff_weights_desc(int idx) const; memory::desc src_desc() const; memory::desc dst_desc() const; memory::desc weights_desc() const; memory::desc diff_src_desc() const; memory::desc diff_dst_desc() const; memory::desc diff_weights_desc() const; memory::desc workspace_desc() const; memory::desc scratchpad_desc() const; engine scratchpad_engine() const; primitive_attr get_primitive_attr() const; dnnl::primitive::kind get_kind() const; std::vector<uint8_t> get_cache_blob_id() const; bool next_impl(); primitive_desc_base(); primitive_desc_base(dnnl_primitive_desc_t pd, dnnl::primitive::kind prim_kind); primitive_desc_base( dnnl_primitive_desc_t pd, dnnl::primitive::kind prim_kind, dnnl::prop_kind aprop_kind ); primitive_desc_base( dnnl_primitive_desc_t pd, dnnl::primitive::kind prim_kind, dnnl::prop_kind prop_kind1, dnnl::prop_kind prop_kind2 );

Detailed Documentation

Base class for primitive descriptors for RNN primitives.
Construction
rnn_primitive_desc_base()
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.
Parameters:
pd
C API primitive descriptor.
aprop_kind
Expected propagation kind.
cell_kind
Expected cell kind.
Methods
memory::desc src_layer_desc() const
Returns source layer memory descriptor.
Returns:
Source layer memory descriptor.
memory::desc augru_attention_desc() const
Returns AUGRU attention memory descriptor.
Returns:
AUGRU attention memory descriptor.
memory::desc src_iter_desc() const
Returns source iteration memory descriptor.
Returns:
Source iteration memory descriptor.
A zero memory descriptor if the primitive does not have a source iteration parameter.
memory::desc src_iter_c_desc() const
Returns source recurrent cell state memory descriptor.
Returns:
Source recurrent cell state memory descriptor.
memory::desc weights_layer_desc() const
Returns weights layer memory descriptor.
Returns:
Weights layer memory descriptor.
memory::desc weights_iter_desc() const
Returns weights iteration memory descriptor.
Returns:
Weights iteration memory descriptor.
memory::desc weights_peephole_desc() const
Returns weights peephole memory descriptor.
Returns:
Weights peephole memory descriptor.
memory::desc weights_projection_desc() const
Returns weights projection memory descriptor.
Returns:
Weights projection memory descriptor.
memory::desc bias_desc() const
Returns bias memory descriptor.
Returns:
Bias memory descriptor.
A zero memory descriptor if the primitive does not have a bias parameter.
memory::desc dst_layer_desc() const
Returns destination layer memory descriptor.
Returns:
Destination layer memory descriptor.
memory::desc dst_iter_desc() const
Returns destination iteration memory descriptor.
Returns:
Destination iteration memory descriptor.
A zero memory descriptor if the primitive does not have a destination iteration parameter.
memory::desc dst_iter_c_desc() const
Returns destination recurrent cell state memory descriptor.
Returns:
Destination recurrent cell state memory descriptor.
memory::desc diff_src_layer_desc() const
Returns diff source layer memory descriptor.
Returns:
Diff source layer memory descriptor.
memory::desc diff_augru_attention_desc() const
Returns diff AUGRU attention memory descriptor.
Returns:
Diff AUGRU attention memory descriptor.
memory::desc diff_src_iter_desc() const
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.
memory::desc diff_src_iter_c_desc() const
Returns diff source recurrent cell state memory descriptor.
Returns:
Diff source recurrent cell state memory descriptor.
memory::desc diff_weights_layer_desc() const
Returns diff weights layer memory descriptor.
Returns:
Diff weights layer memory descriptor.
memory::desc diff_weights_iter_desc() const
Returns diff weights iteration memory descriptor.
Returns:
Diff weights iteration memory descriptor.
memory::desc diff_weights_peephole_desc() const
Returns diff weights peephole memory descriptor.
Returns:
Diff weights peephole memory descriptor.
memory::desc diff_weights_projection_desc() const
Returns diff weights projection memory descriptor.
Returns:
Diff weights projection memory descriptor.
memory::desc diff_bias_desc() const
Returns diff bias memory descriptor.
Returns:
Diff bias memory descriptor.
A zero memory descriptor if the primitive does not have a diff bias parameter.
memory::desc diff_dst_layer_desc() const
Returns diff destination layer memory descriptor.
Returns:
Diff destination layer memory descriptor.
memory::desc diff_dst_iter_desc() const
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.
memory::desc diff_dst_iter_c_desc() const
Returns diff destination recurrent cell state memory descriptor.
Returns:
Diff destination recurrent cell state memory descriptor.
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.
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:
desc
Constant C API operation descriptor.
attr
Pointer to primitive attributes. It is safe to pass nullptr to indicate absence of attributes.
aengine
Engine to use.
hint_fwd_pd
C 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_empty
A 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.

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.