mxnet
|
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"
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 mxnet::ShapeVector &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. An operator could register ResourceRequestEx, or ResourceRequest, or neither. More... | |
using | mxnet::FResourceRequestEx = std::function< std::vector< ResourceRequest >(const NodeAttrs &n, const int dev_mask, const DispatchMode dispatch_mode)> |
The resource request from the operator. An operator could register ResourceRequestEx, or ResourceRequest, or neither. If an operator registers both ResourceRequestEx and ResourceRequest, ResourceRequest is ignored. 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)> |
Register 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)> |
Register 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)> |
Register a storage and dispatch mode inference function based on storage types of the inputs and outputs, and the dev_mask for the operator. More... | |
using | mxnet::FQuantizedOp = std::function< nnvm::NodePtr(const NodeAttrs &attrs)> |
Register a quantized node creation function based on the attrs of the node. More... | |
using | mxnet::FNeedRequantize = std::function< bool(const NodeAttrs &attrs)> |
Register a function to determine if the output of a quantized operator needs to be requantized. This is usually used for the operators taking int8 data types while accumulating in int32, e.g. quantized_conv. More... | |
using | mxnet::FAvoidQuantizeInput = std::function< bool(const NodeAttrs &attrs, size_t index)> |
Register a function to determine if the input of a quantized operator needs to be quantized. This is usually used for the quantized operators which can handle fp32 inputs directly. 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::kCrossDeviceCopy, mxnet::ExecType::kSubgraphExec } |
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... | |
Additional operator attributes beside the ones provided by NNVM.
Copyright (c) 2016 by Contributors