mxnet
Classes | Namespaces | Typedefs | Enumerations
op_attr_types.h File Reference

Additional operator attributes beside the ones provided by NNVM. More...

#include <mshadow/tensor.h>
#include <nnvm/op_attr_types.h>
#include <vector>
#include <functional>
#include "./base.h"
#include "./ndarray.h"
#include "./engine.h"
#include "./resource.h"
Include dependency graph for op_attr_types.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mxnet::OpContext
 All the possible information needed by Operator.Forward and Backward This is the superset of RunContext. We use this data structure to bookkeep everything needed by Forward and Backward. More...
 
class  mxnet::OpStatePtr
 Operator state. This is a pointer type, its content is mutable even if OpStatePtr is const. More...
 

Namespaces

 mxnet
 namespace of mxnet
 

Typedefs

using mxnet::FCreateOpState = std::function< OpStatePtr(const NodeAttrs &attrs, Context ctx, const std::vector< TShape > &in_shape, const std::vector< int > &in_type)>
 Create a Layer style, forward/backward operator. This is easy to write code that contains state. OpStatePtr is a pointer type, it's content is mutable even if OpStatePtr is constant. More...
 
using mxnet::FExecType = std::function< ExecType(const NodeAttrs &attrs)>
 Execution mode of this operator. More...
 
using mxnet::FStatefulCompute = std::function< void(const OpStatePtr &state, const OpContext &ctx, const std::vector< TBlob > &inputs, const std::vector< OpReqType > &req, const std::vector< TBlob > &outputs)>
 Resiger a compute function for stateful operator. OpStatePtr is a pointer type, it's content is mutable even if OpStatePtr is constant. More...
 
using mxnet::FStatefulComputeEx = std::function< void(const OpStatePtr &state, const OpContext &ctx, const std::vector< NDArray > &inputs, const std::vector< OpReqType > &req, const std::vector< NDArray > &outputs)>
 Resiger a compute function for stateful operator using NDArray interface. OpStatePtr is a pointer type, it's content is mutable even if OpStatePtr is constant. More...
 
using mxnet::FResourceRequest = std::function< std::vector< ResourceRequest >(const NodeAttrs &n)>
 The resource request from the operator. More...
 
using mxnet::FNDArrayFunction = std::function< void(const nnvm::NodeAttrs &attrs, const std::vector< NDArray > &inputs, std::vector< NDArray > *outputs)>
 Register an operator called as a NDArray function. More...
 
using mxnet::FCompute = std::function< void(const nnvm::NodeAttrs &attrs, const OpContext &ctx, const std::vector< TBlob > &inputs, const std::vector< OpReqType > &req, const std::vector< TBlob > &outputs)>
 Resiger a compute function for simple stateless forward only operator. More...
 
using mxnet::FComputeEx = std::function< void(const nnvm::NodeAttrs &attrs, const OpContext &ctx, const std::vector< NDArray > &inputs, const std::vector< OpReqType > &req, const std::vector< NDArray > &outputs)>
 Resiger an NDArray compute function for simple stateless forward only operator. More...
 
using mxnet::FInferStorageType = std::function< bool(const NodeAttrs &attrs, const int dev_mask, DispatchMode *dispatch_mode, std::vector< int > *in_attrs, std::vector< int > *out_attrs)>
 Resiger a storage and dispatch mode inference function based on storage types of the inputs and outputs, and the dev_mask for the operator. More...
 

Enumerations

enum  mxnet::OpReqType { mxnet::kNullOp, mxnet::kWriteTo, mxnet::kWriteInplace, mxnet::kAddTo }
 operation request type to Forward and Backward More...
 
enum  mxnet::ExecType { mxnet::ExecType::kSync, mxnet::ExecType::kAsync, mxnet::ExecType::kLocal, mxnet::ExecType::kCrossDeviceCopy }
 the execution type of the operator More...
 
enum  mxnet::DispatchMode {
  mxnet::DispatchMode::kUndefined = -1, mxnet::DispatchMode::kFCompute, mxnet::DispatchMode::kFComputeEx, mxnet::DispatchMode::kFComputeFallback,
  mxnet::DispatchMode::kVariable
}
 the dispatch mode of the operator More...
 

Detailed Description

Additional operator attributes beside the ones provided by NNVM.