Tensor Comprehensions
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
caffe2::TcOp< T, Context, Engine > Class Template Reference

#include <tc_op.h>

Inheritance diagram for caffe2::TcOp< T, Context, Engine >:
Collaboration diagram for caffe2::TcOp< T, Context, Engine >:

Public Member Functions

 TcOp (const OperatorDef &operator_def, Workspace *ws)
 
 ~TcOp () override
 

Public Attributes

 USE_OPERATOR_CONTEXT_FUNCTIONS
 

Protected Member Functions

virtual void setupNaiveMappingOptions ()
 
virtual void setupDefaultGradMappingOptions ()
 
void prepareOutputs (const std::vector< const DLTensor * > tensorInfo)
 
virtual bool RunOnDevice () override
 

Protected Attributes

std::string tc_
 
std::string gradTc_
 
std::string tcName_
 
std::string gradTcName_
 
bool profile_
 
tc::MappingOptions mappingOptions_
 
tc::MappingOptions gradMappingOptions_
 

Private Attributes

std::unique_ptr
< tc::ExecutionEngine
executionEngine_
 

Constructor & Destructor Documentation

template<typename T , class Context , class Engine = DefaultEngine>
caffe2::TcOp< T, Context, Engine >::TcOp ( const OperatorDef &  operator_def,
Workspace *  ws 
)
inline
template<typename T , class Context , class Engine = DefaultEngine>
caffe2::TcOp< T, Context, Engine >::~TcOp ( )
inlineoverride

Member Function Documentation

template<typename T , class Context , class Engine = DefaultEngine>
void caffe2::TcOp< T, Context, Engine >::prepareOutputs ( const std::vector< const DLTensor * >  tensorInfo)
inlineprotected
template<typename T , class Context , class Engine = DefaultEngine>
virtual bool caffe2::TcOp< T, Context, Engine >::RunOnDevice ( )
inlineoverrideprotectedvirtual
template<typename T , class Context , class Engine = DefaultEngine>
virtual void caffe2::TcOp< T, Context, Engine >::setupDefaultGradMappingOptions ( )
inlineprotectedvirtual

Hook called when the gradMappingOptions are not provided in the Caffe2 operator arguments. Does nothing by default, derived classes can reimplement this to customize stategies.

template<typename T , class Context , class Engine = DefaultEngine>
virtual void caffe2::TcOp< T, Context, Engine >::setupNaiveMappingOptions ( )
inlineprotectedvirtual

Member Data Documentation

template<typename T , class Context , class Engine = DefaultEngine>
std::unique_ptr<tc::ExecutionEngine> caffe2::TcOp< T, Context, Engine >::executionEngine_
private
template<typename T , class Context , class Engine = DefaultEngine>
tc::MappingOptions caffe2::TcOp< T, Context, Engine >::gradMappingOptions_
protected
template<typename T , class Context , class Engine = DefaultEngine>
std::string caffe2::TcOp< T, Context, Engine >::gradTc_
protected
template<typename T , class Context , class Engine = DefaultEngine>
std::string caffe2::TcOp< T, Context, Engine >::gradTcName_
protected
template<typename T , class Context , class Engine = DefaultEngine>
tc::MappingOptions caffe2::TcOp< T, Context, Engine >::mappingOptions_
protected
template<typename T , class Context , class Engine = DefaultEngine>
bool caffe2::TcOp< T, Context, Engine >::profile_
protected
template<typename T , class Context , class Engine = DefaultEngine>
std::string caffe2::TcOp< T, Context, Engine >::tc_
protected
template<typename T , class Context , class Engine = DefaultEngine>
std::string caffe2::TcOp< T, Context, Engine >::tcName_
protected
template<typename T , class Context , class Engine = DefaultEngine>
caffe2::TcOp< T, Context, Engine >::USE_OPERATOR_CONTEXT_FUNCTIONS

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