#include "IRBuilder.h"
#include "Context.h"
#include "Convert.h"
+#include "GraphBuilderRegistry.h"
#include <coco/IR/FeatureLayouts.h>
#include <coco/IR/KernelLayouts.h>
use(layer.bottom(n));
}
- if (layer.type() == "Input")
+ caffeimport::GraphBuilderContext opbuilder_context(module.get(), data.get(), blk, shape_ctx,
+ bag_ctx, weight_ctx);
+
+ if (const auto *graph_builder = caffeimport::GraphBuilderRegistry::get().lookup(layer.type()))
+ {
+ graph_builder->build(layer, &opbuilder_context);
+ }
+ // TODO move type handlers to separate builder
+ else if (layer.type() == "Input")
{
assert(layer.has_input_param());
const auto ¶m = layer.input_param();