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

#include <mpi_broadcast_op.h>

Inheritance diagram for dragon::MPIBroadcastOp< Context >:
dragon::MPIOpBase< Context > dragon::Operator< Context > dragon::OperatorBase

Public Member Functions

 MPIBroadcastOp (const OperatorDef &def, Workspace *ws)
void RunOnDevice () override
 Implement the detailed execution. More...
template<typename T >
void RunImpl ()
- Public Member Functions inherited from dragon::MPIOpBase< Context >
 MPIOpBase (const OperatorDef &def, Workspace *ws)
template<typename T >
MPI_Datatype mpi_dtype ()
template<typename T >
void Recv (T *buf, int count, int from)
template<typename T >
void IRecv (T *buf, int count, int from, MPI_Request *req)
template<typename T >
void Send (const T *buf, int count, int to)
template<typename T >
void SendRecv (const T *send_buf, int send_count, int to, T *recv_buf, int recv_count, int from)
template<typename T >
void BCast (T *buf, int count)
- 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

- Public Attributes inherited from dragon::MPIOpBase< Context >
MPI_Comm comm_
MPI_Group group_
int world_size_
int world_rank_
int comm_size_
int comm_rank_
int comm_root_

Additional Inherited Members

- Public Types inherited from dragon::OperatorBase
typedef Map< string, vector< OperatorBase * > > SubGraph
- 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
 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...

Constructor & Destructor Documentation

◆ MPIBroadcastOp()

template<class Context >
dragon::MPIBroadcastOp< Context >::MPIBroadcastOp ( const OperatorDef &  def,
Workspace ws 

Member Function Documentation

◆ RunImpl()

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

◆ RunOnDevice()

template<class Context >
void dragon::MPIBroadcastOp< Context >::RunOnDevice ( )

Implement the detailed execution.

Implements dragon::Operator< Context >.

Member Data Documentation


template<class Context >
dragon::MPIBroadcastOp< Context >::USE_MPI_FUNCTIONS


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

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