oneAPI Deep Neural Network Library (oneDNN)  1.4.0
Performance library for Deep Learning
Loading...
Searching...
No Matches
dnnl::softmax_forward::primitive_desc Struct Reference

Primitive descriptor for a softmax forward propagation primitive. More...

#include <dnnl.hpp>

Inheritance diagram for dnnl::softmax_forward::primitive_desc:
Collaboration diagram for dnnl::softmax_forward::primitive_desc:

Public Member Functions

 primitive_desc ()=default
 Default constructor. Produces an empty object.
 primitive_desc (const desc &desc, const engine &engine, bool allow_empty=false)
 Constructs a primitive descriptor for a softmax forward propagation primitive.
 primitive_desc (const desc &desc, const primitive_attr &attr, const engine &engine, bool allow_empty=false)
 Constructs a primitive descriptor for a softmax forward propagation primitive.
 primitive_desc (dnnl_primitive_desc_t pd)
 Constructs a primitive descriptor for a softmax forward propagation primitive from a C API primitive descriptor that must have a matching kind.
memory::desc src_desc () const
 Returns a source memory descriptor.
memory::desc dst_desc () const
 Returns a destination memory descriptor.
Public Member Functions inherited from dnnl::primitive_desc
 primitive_desc (const_dnnl_op_desc_t desc, const primitive_attr *attr, const engine &engine, const_dnnl_primitive_desc_t hint_fwd_pd, bool allow_empty=false)
 Constructs a primitive descriptor.
bool next_impl ()
 Advances the primitive iterator to the next implementation.
 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.
 primitive_desc_base (dnnl_primitive_desc_t pd, dnnl::primitive::kind prim_kind, dnnl::prop_kind prop_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.
 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.
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.
const char * impl_info_str () const
 Returns implementation name.
memory::dim query_s64 (query what) const
 Returns a memory::dim value (same as int64_t).
memory::desc query_md (query what, int idx=0) const
 Returns a memory descriptor.
memory::desc src_desc (int idx) const
 Returns a source memory descriptor.
memory::desc dst_desc (int idx) const
 Returns a destination memory descriptor.
memory::desc weights_desc (int idx) const
 Returns a weights memory descriptor.
memory::desc diff_src_desc (int idx) const
 Returns a diff source memory descriptor.
memory::desc diff_dst_desc (int idx) const
 Returns a diff destination memory descriptor.
memory::desc diff_weights_desc (int idx) const
 Returns a diff weights memory descriptor.
memory::desc src_desc () const
 Returns a source memory descriptor.
memory::desc dst_desc () const
 Returns a destination memory descriptor.
memory::desc weights_desc () const
 Returns a weights memory descriptor.
memory::desc diff_src_desc () const
 Returns a diff source memory descriptor.
memory::desc diff_dst_desc () const
 Returns a diff destination memory descriptor.
memory::desc diff_weights_desc () const
 Returns a diff weights memory descriptor.
memory::desc workspace_desc () const
 Returns the workspace memory descriptor.
memory::desc scratchpad_desc () const
 Returns the scratchpad memory descriptor.
engine scratchpad_engine () const
 Returns the engine on which the scratchpad memory is located.
primitive_attr get_primitive_attr () const
 Returns the primitive attributes.
dnnl::primitive::kind get_kind () const
 Returns the kind of the primitive descriptor.
Public Member Functions inherited from dnnl::handle< dnnl_primitive_desc_t >
 handle ()=default
 Constructs an empty handle object.
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.
void reset (dnnl_primitive_desc_t t, bool weak=false)
 Resets the handle wrapper objects to wrap a new C API handle.
dnnl_primitive_desc_t get (bool allow_empty=false) const
 Returns the underlying C API handle.
 operator dnnl_primitive_desc_t () const
 Converts a handle to the underlying C API handle type.
 operator bool () const
 Checks whether the object is empty.

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.
 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.
 primitive_desc_base (dnnl_primitive_desc_t pd, dnnl::primitive::kind prim_kind, dnnl::prop_kind prop_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.
 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.

Detailed Description

Primitive descriptor for a softmax forward propagation primitive.

Examples
softmax.cpp.

Constructor & Destructor Documentation

◆ primitive_desc() [1/3]

dnnl::softmax_forward::primitive_desc::primitive_desc ( const desc & desc,
const engine & engine,
bool allow_empty = false )
inline

Constructs a primitive descriptor for a softmax forward propagation primitive.

Parameters
descdescriptor for a softmax forward propagation primitive.
engineEngine to use.
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.

◆ primitive_desc() [2/3]

dnnl::softmax_forward::primitive_desc::primitive_desc ( const desc & desc,
const primitive_attr & attr,
const engine & engine,
bool allow_empty = false )
inline

Constructs a primitive descriptor for a softmax forward propagation primitive.

Parameters
descDescriptor for a softmax forward propagation primitive.
engineEngine to use.
attrPrimitive attributes to use.
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.

◆ primitive_desc() [3/3]

dnnl::softmax_forward::primitive_desc::primitive_desc ( dnnl_primitive_desc_t pd)
inline

Constructs a primitive descriptor for a softmax forward propagation primitive from a C API primitive descriptor that must have a matching kind.

Parameters
pdC API primitive descriptor for a softmax forward propagation primitive.

Member Function Documentation

◆ src_desc()

memory::desc dnnl::softmax_forward::primitive_desc::src_desc ( ) const
inline

Returns a source memory descriptor.

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

◆ dst_desc()

memory::desc dnnl::softmax_forward::primitive_desc::dst_desc ( ) const
inline

Returns a destination memory descriptor.

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

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