| 24 | { |
| 25 | |
| 26 | const std::string toString(luci::CircleOpcode opcode) |
| 27 | { |
| 28 | static const char *names[] = { |
| 29 | #define CIRCLE_NODE(OPCODE, CIRCLE_CLASS) #CIRCLE_CLASS, |
| 30 | #define CIRCLE_VNODE(OPCODE, CIRCLE_CLASS) #CIRCLE_CLASS, |
| 31 | #include <luci/IR/CircleNodes.lst> |
| 32 | #undef CIRCLE_NODE |
| 33 | #undef CIRCLE_VNODE |
| 34 | }; |
| 35 | |
| 36 | auto const node_name = names[static_cast<int>(opcode)]; |
| 37 | |
| 38 | assert(std::string(node_name).substr(0, 6) == "Circle"); // FIX_ME_UNLESS |
| 39 | |
| 40 | // Return substring of class name ("Circle" is sliced out) |
| 41 | // Ex: Return "Conv2D" for "CircleConv2D" node |
| 42 | return std::string(node_name).substr(6); |
| 43 | } |
| 44 | |
| 45 | const std::string toString(luci::FusedActFunc fused_act) |
| 46 | { |
no outgoing calls