diff --git a/compiler/luci-interpreter/src/loader/KernelBuilder.cpp b/compiler/luci-interpreter/src/loader/KernelBuilder.cpp index 6c62cc27fb0..6afda4a1d17 100644 --- a/compiler/luci-interpreter/src/loader/KernelBuilder.cpp +++ b/compiler/luci-interpreter/src/loader/KernelBuilder.cpp @@ -86,26 +86,6 @@ #include -namespace -{ - -template -std::vector collectOutputNodes(const luci::CircleNode *node) -{ - std::vector output_nodes; - for (const loco::Node *loco_node : loco::succs(node)) - { - output_nodes.push_back(loco::must_cast(loco_node)); - } - std::sort(output_nodes.begin(), output_nodes.end(), - [](const CircleNodeOut *node1, const CircleNodeOut *node2) { - return node1->index() < node2->index(); - }); - return {output_nodes.cbegin(), output_nodes.cend()}; -} - -} // namespace - namespace luci_interpreter { diff --git a/compiler/luci-interpreter/src/loader/KernelBuilderHelper.h b/compiler/luci-interpreter/src/loader/KernelBuilderHelper.h index fc4c7268c70..d6fb253b17d 100644 --- a/compiler/luci-interpreter/src/loader/KernelBuilderHelper.h +++ b/compiler/luci-interpreter/src/loader/KernelBuilderHelper.h @@ -64,6 +64,21 @@ class KernelBuilderHelper const std::unordered_map &_node_to_tensor; }; +template +std::vector collectOutputNodes(const loco::Node *node) +{ + std::vector output_nodes; + for (const loco::Node *loco_node : loco::succs(node)) + { + output_nodes.push_back(loco::must_cast(loco_node)); + } + std::sort(output_nodes.begin(), output_nodes.end(), + [](const CircleNodeOut *node1, const CircleNodeOut *node2) { + return node1->index() < node2->index(); + }); + return {output_nodes.cbegin(), output_nodes.cend()}; +} + } // namespace luci_interpreter #endif // LUCI_INTERPRETER_LOADER_KERNELBUILDER_HELPER_H