38 const std::shared_ptr<TensorBuilder> &tensor_builder,
39 const std::shared_ptr<basic::TensorRegistry> &tensor_reg,
40 const std::shared_ptr<DevContext> &dev_context)
41 : basic::KernelGeneratorBase{graph}, _ctx(graph.operands()), _operations_ctx{graph.operations()},
42 _tensor_builder(tensor_builder), _tensor_reg{tensor_reg}, _dev_context{dev_context}
49 auto ret = std::make_unique<exec::FunctionSequence>();
50 ret->enableDynamicShapeInferer(
false);
62 std::vector<IPortableTensor *> output_tensors;
63 for (
const auto &ofm_idx : node.getOutputs())
64 output_tensors.emplace_back(_tensor_reg->getPortableTensor(ofm_idx));
66 std::vector<const IPortableTensor *> input_tensors;
67 for (
const auto &ifm_idx : node.getInputs())
68 input_tensors.emplace_back(_tensor_reg->getPortableTensor(ifm_idx));
73 auto fn = std::make_unique<ops::BulkLayer>();
75 fn->configure(input_tensors, output_tensors, binary_path, _dev_context);
std::unique_ptr< exec::IFunction > _return_fn
std::unique_ptr< exec::IFunction > releaseFunction()
KernelGenerator(const ir::Graph &graph, const std::shared_ptr< TensorBuilder > &tensor_builder, const std::shared_ptr< basic::TensorRegistry > &tensor_reg, const std::shared_ptr< DevContext > &dev_context)
std::unique_ptr< exec::FunctionSequence > generate(ir::OperationIndex op_ind) override
const Operations & operations() const override
const Param & param() const
const Object & at(const Index &index) const
Get the object that is associated with the given index.
This file contains utility macro.