mxnet
Classes | Namespaces | Macros
op.h File Reference

Operator information structor. More...

#include <dmlc/parameter.h>
#include <functional>
#include <limits>
#include <string>
#include <typeinfo>
#include <utility>
#include <vector>
#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)   DMLC_STR_CONCAT(NNVM_REGISTER_GVAR_DEF(GroupName), __COUNTER__) = ::nnvm::OpGroup { #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:

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)    DMLC_STR_CONCAT(NNVM_REGISTER_GVAR_DEF(GroupName), __COUNTER__) = ::nnvm::OpGroup { #GroupName }

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
NNVM_REGISTER_VAR_DEF
#define NNVM_REGISTER_VAR_DEF(OpName)
Definition: op.h:383
dmlc::Registry::Get
static Registry * Get()
get a singleton of the Registry. This function can be defined by DMLC_REGISTRY_ENABLE.
mxnet::FInferShape
nnvm::FInferNodeEntryAttr< mxnet::TShape > FInferShape
Shape inference function. Update the shapes given the input shape information. TShape....
Definition: tuple.h:842
dmlc::Registry::__REGISTER_OR_GET__
EntryType & __REGISTER_OR_GET__(const std::string &name)
Internal function to either register or get registered entry.
Definition: registry.h:95
DMLC_STR_CONCAT
#define DMLC_STR_CONCAT(__x, __y)
Definition: base.h:162
NNVM_REGISTER_OP_GROUP
#define NNVM_REGISTER_OP_GROUP(GroupName)
Register attribute to a group of operators. These attributes will be registered to Op that include th...
Definition: op.h:429
NNVM_REGISTER_OP
#define NNVM_REGISTER_OP(OpName)
Register a new operator, or set attribute of the corresponding op.
Definition: op.h:404