From: 윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 Date: Mon, 5 Aug 2019 00:15:28 +0000 (+0900) Subject: [moco-tf] implementing make_graph_builder_registry(..) function (#6175) X-Git-Tag: submit/tizen/20190809.050447~205 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a75905cb081c86a6b6b12b13aec25578ccd1802c;p=platform%2Fcore%2Fml%2Fnnfw.git [moco-tf] implementing make_graph_builder_registry(..) function (#6175) This adds `make_graph_builder_registry(..)` function, which makes graph builder registry that finds custom op graph builder and then searches into the default registry. Signed-off-by: Hyun Sik Yoon --- diff --git a/compiler/moco-tf/src/Frontend.cpp b/compiler/moco-tf/src/Frontend.cpp index 75b1a69..d62b9c9 100644 --- a/compiler/moco-tf/src/Frontend.cpp +++ b/compiler/moco-tf/src/Frontend.cpp @@ -24,6 +24,8 @@ #include "Transforms.h" +#include "Op/COpCall.h" + #include #include @@ -108,7 +110,13 @@ moco::tf::GraphBuilderRegistry make_graph_builder_registry(const moco::tf::Model { moco::tf::GraphBuilderRegistry registry{&moco::tf::GraphBuilderRegistry::get()}; - // TODO add GraphBuilder for Custom op into registry + // build a COpCallGraphBuilder per custom op type + for (const auto &custom_op : sig.customops()) + { + std::unique_ptr builder = + stdex::make_unique(&sig); + registry.add(custom_op, std::move(builder)); + } return registry; }