41template <typename CircleOp, typename std::enable_if_t<is_VariadicArity<CircleOp>::value &&
45 return CircleOp(1, 1);
49template <
typename CircleOp,
50 typename std::enable_if_t<is_VariadicArity<CircleOp>::value &&
58template <
typename CircleOp,
59 typename std::enable_if_t<!is_VariadicArity<CircleOp>::value> * =
nullptr>
81#define CIRCLE_NODE(OPCODE, CLASS) \
82 case luci::CircleOpcode::OPCODE: \
84 auto node_ = dynamic_cast<CLASS *>(node); \
85 node_->padding(Padding::SAME); \
108#define CIRCLE_NODE(OPCODE, CLASS) \
109 case luci::CircleOpcode::OPCODE: \
111 auto node_ = dynamic_cast<CLASS *>(node); \
112 auto mode_ = node_->mode(); \
113 node_->mode(decltype(mode_)(1)); \
138 std::string lookup(
const loco::Node *)
const override {
return ""; }
148 builder.
build(node, &tbl, s);
156 std::vector<std::string> arg_names;
157 for (
int i = 0; i < node->
arity(); i++)
159 auto args = s.args().at(i);
161 arg_names.emplace_back(args.first);
165 auto opname = s.opname().substr(7);
167 json_export.
key_val(opname, arg_names,
true);
172 std::stringstream ss;
176#define CIRCLE_NODE(OP, CIRCLE_OP) \
178 auto node = CircleNodeCreator<CIRCLE_OP>(); \
179 fill_dummies_for_summary_creation(&node); \
180 auto summary = create_circle_node_summary(&node); \
181 get_input_names_from_summary(&node, summary, json_export); \
183#define CIRCLE_VNODE(_1, _2)
184#include <luci/IR/CircleNodes.lst>
188 ss.seekp(-2, std::ios_base::end) <<
'\n';
191 std::cout << ss.str();
void key_val(const std::string &key, const std::string &value, bool cont)
void close_brace(bool cont)
Logical unit of computation.
virtual uint32_t arity(void) const =0
Return the number of arguments.
AVERAGE_POOL_2D in Circle.
DEPTHWISE_CONV_2D in Circle.
bool build(const loco::Node *node, const locop::SymbolTable *tbl, locop::NodeSummary &s)
TRANSPOSE_CONV in Circle.
virtual CircleOpcode opcode(void) const =0