Dragon - C++ API
A Computation Graph Virtual Machine Based Deep Learning Framework
Public Member Functions | Public Attributes | Protected Attributes | List of all members
dragon::CuDNNConv2dOp< Context > Class Template Referencefinal

#include <conv_op.h>

Inheritance diagram for dragon::CuDNNConv2dOp< Context >:
dragon::Conv2dOp< Context > dragon::ConvOpBase< Context > dragon::Operator< Context > dragon::OperatorBase

Public Member Functions

 CuDNNConv2dOp (const OperatorDef &def, Workspace *ws)
 
 ~CuDNNConv2dOp ()
 
void RunOnDevice () override
 Implement the detailed execution. More...
 
void SetConvDescFromInputs ()
 
template<typename T >
void ResetDesc ()
 
template<typename T >
void RunImpl ()
 
- Public Member Functions inherited from dragon::Conv2dOp< Context >
 Conv2dOp (const OperatorDef &def, Workspace *ws)
 
bool Transposed () override
 
bool HasBias () override
 
template<typename T >
void RunImpl ()
 
- Public Member Functions inherited from dragon::ConvOpBase< Context >
 ConvOpBase (const OperatorDef &def, Workspace *ws)
 
 DECLARE_ARGS_WITH_DESC (int64_t, output_shape)
 
 DECLARE_ARGS_WITH_DESC (int64_t, output_padding)
 
void Setup (int num_axes)
 
void Reshape (bool backward=false)
 
template<typename T >
void Wx (const T *, const T *, T *, bool)
 
template<typename T >
void Pb (const T *, T *)
 
template<typename T >
void Dx (const T *, const T *, T *)
 
template<typename T >
void Dw (const T *, const T *, T *, bool)
 
template<typename T >
void Db (const T *, T *)
 
- Public Member Functions inherited from dragon::Operator< Context >
 Operator (const OperatorDef &def, Workspace *ws)
 Default constructor. More...
 
void Run (int stream_id=0) final
 Run this operator on the specified stream. More...
 
virtual void PrepareResource ()
 Prepare the content of inputs. More...
 
virtual void ReleaseResource ()
 Release the ownership of inputs. More...
 
virtual void MemorySwitch ()
 Coordinate the context of inputs and outputs. More...
 
Context * ctx ()
 Return the internal context. More...
 
bool AllowRun ()
 Whether this operator can be ignored. More...
 
- Public Member Functions inherited from dragon::OperatorBase
 OperatorBase (const OperatorDef &def, Workspace *ws)
 Default constructor. More...
 
virtual ~OperatorBase ()
 Default deconstructor. More...
 
TensorX (int i)
 Return the specified input tensor. More...
 
TensorY (int i)
 Return the specified output tensor. More...
 
int XSize ()
 Return the number of inputs. More...
 
int YSize ()
 Return the number of outputs. More...
 
void UpdateFrom (const OperatorDef &def)
 Modify operator according to the given def. More...
 
void SwitchToPhase (const string &phase)
 Switch the internal running phase. More...
 
virtual void Fusion (void *graph)
 Fusion this operator into the specified graph. More...
 
const string & name () const
 Return the operator name. More...
 
const string & type () const
 Return the operator type. More...
 
const string & phase () const
 Return the current running phase. More...
 
const string & handle () const
 Return the resource handle. More...
 
const string & dtype () const
 Return the data type. More...
 
const string & data_format () const
 Return the data format. More...
 
const string unique_name (const string &name) const
 Return the unique name in this operator. More...
 
Workspacews () const
 Return the parent workspace. More...
 
template<typename T >
Arg (const string &name, const T &default_value)
 Return the value of the specified argument. More...
 
template<typename T >
vector< T > Args (const string &name)
 Return the values of the specified argument. More...
 
const Map< std::string, const Argument * > & args ()
 Return the argument map. More...
 
const Argument & arg (const string &name)
 Return the specified argument. More...
 
SubGraphsubgraph ()
 Return the recomputing subgraph. More...
 
void set_subgraph (SubGraph subgraph)
 Set the given recomputing subgraph. More...
 
const OperatorDef & def () const
 Return the stored def. More...
 
string DebugString () const
 Return the debug string of stored def. More...
 
string DTypeString (const Tensor &, const Set< string > &) const
 Return the dtype string according to given tensor. More...
 
string DTypeString (const string &, const Set< string > &) const
 

Public Attributes

 USE_OPERATOR_FUNCTIONS
 
 USE_CONVOLUTION_FUNCTIONS
 
- Public Attributes inherited from dragon::Conv2dOp< Context >
 USE_OPERATOR_FUNCTIONS
 
 USE_CONVOLUTION_FUNCTIONS
 
- Public Attributes inherited from dragon::ConvOpBase< Context >
 USE_OPERATOR_FUNCTIONS
 
vec64_t kshape_
 
vec64_t stride_
 
vec64_t pad_l_
 
vec64_t pad_r_
 
vec64_t dilation_
 
vec64_t in_shape_
 
vec64_t out_shape_
 
vec64_t x_shape_
 
vec64_t y_shape_
 
vec64_t w_shape_
 
vec64_t b_shape_
 
string padding_
 
int64_t is_1x1_
 
int64_t num_output_
 
int64_t group_
 
int64_t axis_
 
int64_t num_axes_
 
int64_t channels_
 
int64_t out_dim_
 
int64_t conv_in_channels_
 
int64_t conv_out_channels_
 
int64_t conv_out_dim_
 
int64_t kernel_dim_
 
int64_t col_dim_
 
int64_t col_ofs_
 
int64_t output_ofs_
 
int64_t w_ofs_
 
int64_t x_ofs_
 
int64_t y_ofs_
 

Protected Attributes

cudnnDataType_t compute_type_
 
cudnnTensorFormat_t format_
 
cudnnConvolutionFwdAlgo_t fwd_algo_
 
cudnnTensorDescriptor_t input_desc_
 
cudnnTensorDescriptor_t output_desc_
 
cudnnTensorDescriptor_t bias_desc_
 
cudnnTensorDescriptor_t output2b_desc_
 
cudnnConvolutionDescriptor_t conv_desc_
 
cudnnFilterDescriptor_t filter_desc_
 
size_t fwd_data_size_
 
int64_t cudnn_group_
 
int64_t enable_tensor_core_
 
vec64_t input_dims_
 
vec64_t filter_dims_
 
- Protected Attributes inherited from dragon::Operator< Context >
Context ctx_
 Store the internal context. More...
 
bool allow_run_
 
bool allow_recomp_
 
bool do_sync_
 
- Protected Attributes inherited from dragon::OperatorBase
Workspacews_
 Store the parent workspace. More...
 
OperatorDef def_
 Store the def. More...
 
SubGraph subgraph_
 Store the recomputing subgraph. More...
 
string phase_
 Store the phase and handle. More...
 
string handle_
 
string dtype_
 Store the data type and format. More...
 
string data_format_
 
vector< Tensor * > inputs_
 Store the pointer of inputs and outputs. More...
 
vector< Tensor * > outputs_
 
Map< string, const Argument * > args_
 Store the defined arguments. More...
 

Additional Inherited Members

- Public Types inherited from dragon::OperatorBase
typedef Map< string, vector< OperatorBase * > > SubGraph
 

Constructor & Destructor Documentation

◆ CuDNNConv2dOp()

template<class Context >
dragon::CuDNNConv2dOp< Context >::CuDNNConv2dOp ( const OperatorDef &  def,
Workspace ws 
)
inline

◆ ~CuDNNConv2dOp()

template<class Context >
dragon::CuDNNConv2dOp< Context >::~CuDNNConv2dOp ( )
inline

Member Function Documentation

◆ ResetDesc()

template<class Context >
template<typename T >
void dragon::CuDNNConv2dOp< Context >::ResetDesc ( )

◆ RunImpl()

template<class Context >
template<typename T >
void dragon::CuDNNConv2dOp< Context >::RunImpl ( )

◆ RunOnDevice()

template<class Context >
void dragon::CuDNNConv2dOp< Context >::RunOnDevice ( )
overridevirtual

Implement the detailed execution.

Reimplemented from dragon::Conv2dOp< Context >.

◆ SetConvDescFromInputs()

template<class Context >
void dragon::CuDNNConv2dOp< Context >::SetConvDescFromInputs ( )

Member Data Documentation

◆ bias_desc_

template<class Context >
cudnnTensorDescriptor_t dragon::CuDNNConv2dOp< Context >::bias_desc_
protected

◆ compute_type_

template<class Context >
cudnnDataType_t dragon::CuDNNConv2dOp< Context >::compute_type_
protected

◆ conv_desc_

template<class Context >
cudnnConvolutionDescriptor_t dragon::CuDNNConv2dOp< Context >::conv_desc_
protected

◆ cudnn_group_

template<class Context >
int64_t dragon::CuDNNConv2dOp< Context >::cudnn_group_
protected

◆ enable_tensor_core_

template<class Context >
int64_t dragon::CuDNNConv2dOp< Context >::enable_tensor_core_
protected

◆ filter_desc_

template<class Context >
cudnnFilterDescriptor_t dragon::CuDNNConv2dOp< Context >::filter_desc_
protected

◆ filter_dims_

template<class Context >
vec64_t dragon::CuDNNConv2dOp< Context >::filter_dims_
protected

◆ format_

template<class Context >
cudnnTensorFormat_t dragon::CuDNNConv2dOp< Context >::format_
protected

◆ fwd_algo_

template<class Context >
cudnnConvolutionFwdAlgo_t dragon::CuDNNConv2dOp< Context >::fwd_algo_
protected

◆ fwd_data_size_

template<class Context >
size_t dragon::CuDNNConv2dOp< Context >::fwd_data_size_
protected

◆ input_desc_

template<class Context >
cudnnTensorDescriptor_t dragon::CuDNNConv2dOp< Context >::input_desc_
protected

◆ input_dims_

template<class Context >
vec64_t dragon::CuDNNConv2dOp< Context >::input_dims_
protected

◆ output2b_desc_

template<class Context >
cudnnTensorDescriptor_t dragon::CuDNNConv2dOp< Context >::output2b_desc_
protected

◆ output_desc_

template<class Context >
cudnnTensorDescriptor_t dragon::CuDNNConv2dOp< Context >::output_desc_
protected

◆ USE_CONVOLUTION_FUNCTIONS

template<class Context >
dragon::CuDNNConv2dOp< Context >::USE_CONVOLUTION_FUNCTIONS

◆ USE_OPERATOR_FUNCTIONS

template<class Context >
dragon::CuDNNConv2dOp< Context >::USE_OPERATOR_FUNCTIONS

The documentation for this class was generated from the following files: