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

Function outputPyArray

compiler/dalgona/src/Utils.cpp:158–171  ·  view source on GitHub ↗

Note: Only returns 1 output

Source from the content-addressed store, hash-verified

156
157// Note: Only returns 1 output
158py::dict outputPyArray(const luci::CircleNode *node, luci_interpreter::Interpreter *interpreter)
159{
160 assert(node != nullptr); // FIX_CALLER_UNLESS
161 assert(interpreter != nullptr); // FIX_CALLER_UNLESS
162
163 const auto tensor = interpreter->getTensor(node);
164
165 THROW_UNLESS(tensor != nullptr, "Null tensor detected in " + node->name());
166
167 auto py_output = py::dict("name"_a = node->name(), "data"_a = numpyArray(tensor),
168 "quantparam"_a = quantparam(tensor),
169 "is_const"_a = node->opcode() == luci::CircleOpcode::CIRCLECONST);
170 return py_output;
171}
172
173bool multi_out_node(const luci::CircleNode *node)
174{

Callers 3

startNetworkExecutionMethod · 0.85
endNetworkExecutionMethod · 0.85
visitMethod · 0.85

Calls 5

numpyArrayFunction · 0.85
quantparamFunction · 0.85
getTensorMethod · 0.45
nameMethod · 0.45
opcodeMethod · 0.45

Tested by

no test coverage detected