mxnet
Public Member Functions | Public Attributes | List of all members
CustomOp Class Reference

Class to hold custom operator registration. More...

#include <lib_api.h>

Collaboration diagram for CustomOp:
Collaboration graph

Public Member Functions

 CustomOp (const char *op_name)
 
CustomOpsetForward (fcomp_t fcomp, const char *ctx)
 
CustomOpsetBackward (fcomp_t fgrad, const char *ctx)
 
CustomOpsetParseAttrs (parseAttrs_t func)
 
CustomOpsetInferType (inferType_t func)
 
CustomOpsetInferSType (inferSType_t func)
 
CustomOpsetInferShape (inferShape_t func)
 
CustomOpsetMutateInputs (mutateInputs_t func)
 
CustomOpsetCreateOpState (createOpState_t func, const char *ctx)
 
CustomOpsetIsSubgraphOp ()
 
void mapToVector ()
 
 ~CustomOp ()
 

Public Attributes

const char * name
 operator name More...
 
parseAttrs_t parse_attrs
 operator functions More...
 
inferType_t infer_type
 
inferSType_t infer_storage_type
 
inferShape_t infer_shape
 
mutateInputs_t mutate_inputs
 
bool isSGop
 
std::vector< const char * > forward_ctx_cstr
 vector repr of ctx map to be easily loaded from c_api More...
 
std::vector< const char * > backward_ctx_cstr
 
std::vector< const char * > create_op_ctx_cstr
 
std::vector< fcomp_tforward_fp
 
std::vector< fcomp_tbackward_fp
 
std::vector< createOpState_tcreate_op_fp
 

Detailed Description

Class to hold custom operator registration.

Constructor & Destructor Documentation

CustomOp::CustomOp ( const char *  op_name)
inlineexplicit
CustomOp::~CustomOp ( )
inline

Member Function Documentation

void CustomOp::mapToVector ( )
inline
CustomOp& CustomOp::setBackward ( fcomp_t  fgrad,
const char *  ctx 
)
inline
CustomOp& CustomOp::setCreateOpState ( createOpState_t  func,
const char *  ctx 
)
inline
CustomOp& CustomOp::setForward ( fcomp_t  fcomp,
const char *  ctx 
)
inline
CustomOp& CustomOp::setInferShape ( inferShape_t  func)
inline
CustomOp& CustomOp::setInferSType ( inferSType_t  func)
inline
CustomOp& CustomOp::setInferType ( inferType_t  func)
inline
CustomOp& CustomOp::setIsSubgraphOp ( )
inline
CustomOp& CustomOp::setMutateInputs ( mutateInputs_t  func)
inline
CustomOp& CustomOp::setParseAttrs ( parseAttrs_t  func)
inline

Member Data Documentation

std::vector<const char*> CustomOp::backward_ctx_cstr
std::vector<fcomp_t> CustomOp::backward_fp
std::vector<const char*> CustomOp::create_op_ctx_cstr
std::vector<createOpState_t> CustomOp::create_op_fp
std::vector<const char*> CustomOp::forward_ctx_cstr

vector repr of ctx map to be easily loaded from c_api

std::vector<fcomp_t> CustomOp::forward_fp
inferShape_t CustomOp::infer_shape
inferSType_t CustomOp::infer_storage_type
inferType_t CustomOp::infer_type
bool CustomOp::isSGop
mutateInputs_t CustomOp::mutate_inputs
const char* CustomOp::name

operator name

parseAttrs_t CustomOp::parse_attrs

operator functions


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