// This file was autogenerated by print_selective_registration_header.py #ifndef OPS_TO_REGISTER #define OPS_TO_REGISTER namespace { constexpr const char* skip(const char* x) { return (*x) ? (*x == ' ' ? skip(x + 1) : x) : x; } constexpr bool isequal(const char* x, const char* y) { return (*skip(x) && *skip(y)) ? (*skip(x) == *skip(y) && isequal(skip(x) + 1, skip(y) + 1)) : (!*skip(x) && !*skip(y)); } template struct find_in { static constexpr bool f(const char* x, const char* const y[N]) { return isequal(x, y[0]) || find_in::f(x, y + 1); } }; template<> struct find_in<0> { static constexpr bool f(const char* x, const char* const y[]) { return false; } }; } // end namespace constexpr const char* kNecessaryOpKernelClasses[] = { "BinaryOp< CPUDevice, functor::add>", "ReductionOp", "AvgPoolingOp", "BiasOp", "ConstantOp", "Conv2DOp", "DepthwiseConv2dNativeOp", "DequantizeOp", "FakeQuantWithMinMaxVarsOp", "BinaryOp< CPUDevice, functor::less>", "MatMulOp", "MergeOp", "BinaryOp< CPUDevice, functor::mul>", "NoOp", "PlaceholderOp", "IdentityOp", "Relu6Op", "ReshapeOp", "UnaryOp< CPUDevice, functor::rsqrt>", "SoftmaxOp", "SqueezeOp", "BinaryOp< CPUDevice, functor::sub>", "SwitchOp", "RecvOp", "SendOp", }; #define SHOULD_REGISTER_OP_KERNEL(clz) (find_in::f(clz, kNecessaryOpKernelClasses)) constexpr inline bool ShouldRegisterOp(const char op[]) { return false || isequal(op, "Add") || isequal(op, "All") || isequal(op, "AvgPool") || isequal(op, "BiasAdd") || isequal(op, "Const") || isequal(op, "Conv2D") || isequal(op, "DepthwiseConv2dNative") || isequal(op, "Dequantize") || isequal(op, "FakeQuantWithMinMaxVars") || isequal(op, "Less") || isequal(op, "MatMul") || isequal(op, "Merge") || isequal(op, "Mul") || isequal(op, "NoOp") || isequal(op, "Placeholder") || isequal(op, "PlaceholderWithDefault") || isequal(op, "Relu6") || isequal(op, "Reshape") || isequal(op, "Rsqrt") || isequal(op, "Softmax") || isequal(op, "Squeeze") || isequal(op, "Sub") || isequal(op, "Switch") || isequal(op, "_Recv") || isequal(op, "_Send") ; } #define SHOULD_REGISTER_OP(op) ShouldRegisterOp(op) #define SHOULD_REGISTER_OP_GRADIENT false #endif