| 64 | } |
| 65 | |
| 66 | void PythonHooks::startNetworkExecution(loco::Graph *graph) |
| 67 | { |
| 68 | if (!py::hasattr(_analysis, "StartNetworkExecution")) |
| 69 | return; |
| 70 | |
| 71 | assert(graph != nullptr); // FIX_CALLER_UNLESS |
| 72 | |
| 73 | const auto input_nodes = loco::input_nodes(graph); |
| 74 | py::list inputs; |
| 75 | // Assumption: input_nodes is iterated in the same order of model inputs |
| 76 | for (const auto input_node : input_nodes) |
| 77 | { |
| 78 | auto circle_node = loco::must_cast<luci::CircleInput *>(input_node); |
| 79 | inputs.append(outputPyArray(circle_node, _interpreter)); |
| 80 | } |
| 81 | pySafeCall(_analysis.attr("StartNetworkExecution"), inputs); |
| 82 | } |
| 83 | |
| 84 | void PythonHooks::endNetworkExecution(loco::Graph *graph) |
| 85 | { |
no test coverage detected