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

#define NNVM_REGISTER_GVAR_DEF (   TagName)    static DMLC_ATTRIBUTE_UNUSED ::nnvm::OpGroup __make_ ## NnvmOpGroup ## _ ## TagName
#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:153

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

Parameters
OpNameThe name of registry
1 NNVM_REGISTER_OP(add)
2 .describe("add two inputs together")
3 .set_num_inputs(2)
4 .set_attr<OpKernel>("gpu_kernel", AddKernel);
#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:153

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

Parameters
GroupNameThe name of the group.
1 NNVM_REGISTER_OP(add)
2 .include("ElementwiseOpAttr");
3 
4 // register same attributes to all the ops that include the group
5 NNVM_REGISTER_OP_GROUP(ElementwiseOpAttr)
6 .set_attr<FInferShape>("FInferShape", ElementwiseInferShape);
7 
8 NNVM_REGISTER_OP(mul)
9 .include("ElementwiseOpAttr");
#define NNVM_REGISTER_VAR_DEF (   OpName)    static DMLC_ATTRIBUTE_UNUSED ::nnvm::Op & __make_ ## NnvmOp ## _ ## OpName