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 <hyunsik.yoon@samsung.com>
#include "Transforms.h"
+#include "Op/COpCall.h"
+
#include <cwrap/Fildes.h>
#include <stdex/Memory.h>
{
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<moco::tf::COpCallGraphBuilder> builder =
+ stdex::make_unique<moco::tf::COpCallGraphBuilder>(&sig);
+ registry.add(custom_op, std::move(builder));
+ }
return registry;
}