mxnet
Classes | Namespaces | Macros
op.h File Reference

Operator information structor. More...

#include <dmlc/parameter.h>
#include <string>
#include <vector>
#include <utility>
#include <typeinfo>
#include <limits>
#include <functional>
#include "base.h"
#include "c_api.h"
Include dependency graph for op.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  nnvm::OpMap< ValueType >
 A map data structure that takes Op* as key and returns ValueType. More...
 
class  nnvm::Op
 Operator structure. More...
 
class  nnvm::OpMap< ValueType >
 A map data structure that takes Op* as key and returns ValueType. More...
 
class  nnvm::OpGroup
 auxiliary data structure used to set attributes to a group of operators More...
 

Namespaces

 nnvm
 

Macros

#define NNVM_REGISTER_VAR_DEF(OpName)   static DMLC_ATTRIBUTE_UNUSED ::nnvm::Op & __make_ ## NnvmOp ## _ ## OpName
 
#define NNVM_REGISTER_GVAR_DEF(TagName)   static DMLC_ATTRIBUTE_UNUSED ::nnvm::OpGroup __make_ ## NnvmOpGroup ## _ ## TagName
 
#define NNVM_REGISTER_OP(OpName)
 Register a new operator, or set attribute of the corresponding op. More...
 
#define NNVM_REGISTER_OP_GROUP(GroupName)
 Register attribute to a group of operators. These attributes will be registered to Op that include the group. More...
 

Detailed Description

Operator information structor.

Macro Definition Documentation

◆ NNVM_REGISTER_GVAR_DEF

#define NNVM_REGISTER_GVAR_DEF (   TagName)    static DMLC_ATTRIBUTE_UNUSED ::nnvm::OpGroup __make_ ## NnvmOpGroup ## _ ## TagName

◆ NNVM_REGISTER_OP

#define NNVM_REGISTER_OP (   OpName)
Value:
DMLC_STR_CONCAT(NNVM_REGISTER_VAR_DEF(OpName), __COUNTER__) = \
#define NNVM_REGISTER_VAR_DEF(OpName)
Definition: op.h:386
EntryType & __REGISTER_OR_GET__(const std::string &name)
Internal function to either register or get registered entry.
Definition: registry.h:95
static Registry * Get()
get a singleton of the Registry. This function can be defined by DMLC_REGISTRY_ENABLE.
#define DMLC_STR_CONCAT(__x, __y)
Definition: base.h:162

Register a new operator, or set attribute of the corresponding op.

Parameters
OpNameThe name of registry
.describe("add two inputs together")
.set_num_inputs(2)
.set_attr<OpKernel>("gpu_kernel", AddKernel);

◆ NNVM_REGISTER_OP_GROUP

#define NNVM_REGISTER_OP_GROUP (   GroupName)
Value:
DMLC_STR_CONCAT(NNVM_REGISTER_GVAR_DEF(GroupName), __COUNTER__) = \
::nnvm::OpGroup {#GroupName}
#define NNVM_REGISTER_GVAR_DEF(TagName)
Definition: op.h:389
auxiliary data structure used to set attributes to a group of operators
Definition: op.h:362
#define DMLC_STR_CONCAT(__x, __y)
Definition: base.h:162

Register attribute to a group of operators. These attributes will be registered to Op that include the group.

Parameters
GroupNameThe name of the group.
.include("ElementwiseOpAttr");
// register same attributes to all the ops that include the group
NNVM_REGISTER_OP_GROUP(ElementwiseOpAttr)
.set_attr<FInferShape>("FInferShape", ElementwiseInferShape);
.include("ElementwiseOpAttr");

◆ NNVM_REGISTER_VAR_DEF

#define NNVM_REGISTER_VAR_DEF (   OpName)    static DMLC_ATTRIBUTE_UNUSED ::nnvm::Op & __make_ ## NnvmOp ## _ ## OpName