MCPcopy Create free account
hub / github.com/Samsung/ONE / toString

Function toString

compiler/dalgona/src/StringUtils.cpp:26–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24{
25
26const 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
45const std::string toString(luci::FusedActFunc fused_act)
46{

Callers 4

TESTFunction · 0.70
visitMethod · 0.70
visitMethod · 0.70
outputsPyArrayFunction · 0.70

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.56