if (backend_all_str.compare("none") != 0)
{
VERBOSE(BackendResolver) << "Use backend for all ops: " << backend_all_str << std::endl;
-#define OP(InternalName, IsNnApi, NnApiName) \
+#define OP(InternalName, IsNnApi) \
if (IsNnApi) \
{ \
auto backend = _backend_manager->get(backend_all_str); \
}
else
{
-#define OP(InternalName, IsNnApi, NnApiName) \
- if (IsNnApi) \
- { \
- const auto &backend_str = \
- config::ConfigManager::instance().get<std::string>(config::OP_BACKEND_##NnApiName); \
- auto backend = _backend_manager->get(backend_str); \
- VERBOSE(BackendResolver) << "backend for " << #NnApiName << ": " << backend_str << std::endl; \
- _gen_map[typeid(model::operation::InternalName)] = backend; \
+#define OP(InternalName, IsNnApi) \
+ if (IsNnApi) \
+ { \
+ const auto &backend_str = \
+ config::ConfigManager::instance().get<std::string>(config::OP_BACKEND_##InternalName); \
+ auto backend = _backend_manager->get(backend_str); \
+ VERBOSE(BackendResolver) << "backend for " << #InternalName << ": " << backend_str \
+ << std::endl; \
+ _gen_map[typeid(model::operation::InternalName)] = backend; \
}
#include "model/operation/Op.lst"
#error Define OP before including this file
#endif
-// NOTE The relation between "Internal Name" and "NN API Name" is "1 : N".
+// NOTE The relation between "Internal Name" and "NN API" is "1 : N".
-// Internal Name | NN API? | NN API Name
-OP(AddNode , true , ADD)
-OP(SubNode , true , SUB)
-OP(CastNode , true , CAST_EX)
-OP(Conv2DNode , true , CONV_2D)
-OP(DepthwiseConv2DNode , true , DEPTHWISECONV_2D)
-OP(AvgPool2DNode , true , AVERAGE_POOL_2D)
-OP(MaxPool2DNode , true , MAX_POOL_2D)
-OP(ConcatNode , true , CONCATENATION)
-OP(FullyConnectedNode , true , FULLY_CONNECTED)
-OP(ReduceSumNode , true , REDUCE_SUM_EX)
-OP(ReshapeNode , true , RESHAPE)
-OP(MulNode , true , MUL)
-OP(SoftmaxNode , true , SOFTMAX)
-OP(SqueezeNode , true , SQUEEZE)
-OP(StridedSliceNode , true , STRIDED_SLICE)
-OP(TanhNode , true , TANH)
-OP(LogisticNode , true , LOGISTIC)
-OP(DivNode , true , DIV)
-OP(TransposeNode , true , TRANSPOSE)
-OP(ExpNode , true , EXP_EX)
-OP(ReduceMaxNode , true , TENSORFLOW_MAX_EX)
-OP(NotEqualNode , true , NOT_EQUAL_EX)
-OP(LogicalAndNode , true , LOGICAL_AND_EX)
-OP(RSQRTNode , true , RSQRT_EX)
-OP(ReLUNode , true , RELU)
-OP(ResizeBilinearNode , true , RESIZE_BILINEAR)
-OP(ReLU1Node , true , RELU1)
-OP(ReLU6Node , true , RELU6)
-OP(FloorNode , true , FLOOR)
-OP(SpaceToDepthNode , true , SPACE_TO_DEPTH)
-OP(L2Pool2DNode , true , L2_POOL_2D)
-OP(PermuteNode , false , NOT_AVAILABLE)
+// Internal Name | NN API?
+OP(AddNode , true)
+OP(SubNode , true)
+OP(CastNode , true)
+OP(Conv2DNode , true)
+OP(DepthwiseConv2DNode , true)
+OP(AvgPool2DNode , true)
+OP(MaxPool2DNode , true)
+OP(ConcatNode , true)
+OP(FullyConnectedNode , true)
+OP(ReduceSumNode , true)
+OP(ReshapeNode , true)
+OP(MulNode , true)
+OP(SoftmaxNode , true)
+OP(SqueezeNode , true)
+OP(StridedSliceNode , true)
+OP(TanhNode , true)
+OP(LogisticNode , true)
+OP(DivNode , true)
+OP(TransposeNode , true)
+OP(ExpNode , true)
+OP(ReduceMaxNode , true)
+OP(NotEqualNode , true)
+OP(LogicalAndNode , true)
+OP(RSQRTNode , true)
+OP(ReLUNode , true)
+OP(ResizeBilinearNode , true)
+OP(ReLU1Node , true)
+OP(ReLU6Node , true)
+OP(FloorNode , true)
+OP(SpaceToDepthNode , true)
+OP(L2Pool2DNode , true)
+OP(PermuteNode , false)