35 const std::shared_ptr<TensorBuilder> &tensor_builder,
36 const std::shared_ptr<basic::TensorRegistry> &tensor_reg,
37 const std::shared_ptr<DevContext> &dev_context)
38 : basic::KernelGeneratorBase{graph}, _ctx(graph.operands()), _operations_ctx{graph.operations()},
39 _tensor_builder(tensor_builder), _tensor_reg{tensor_reg}, _dev_context{dev_context}
46 auto ret = std::make_unique<exec::FunctionSequence>();
47 ret->enableDynamicShapeInferer(
false);
59 std::vector<IPortableTensor *> output_tensors;
60 for (
const auto &ofm_idx : node.getOutputs())
61 output_tensors.emplace_back(_tensor_reg->getPortableTensor(ofm_idx));
63 std::vector<const IPortableTensor *> input_tensors;
64 for (
const auto &ifm_idx : node.getInputs())
65 input_tensors.emplace_back(_tensor_reg->getPortableTensor(ifm_idx));
70 if (binary_path.size() == 1)
73 auto fn = std::make_unique<ops::BulkLayer>();
74 fn->configure(input_tensors, output_tensors, binary_path.front(), _dev_context);
80 auto fn = std::make_unique<ops::BulkPipelineLayer>();
81 fn->configure(input_tensors, output_tensors, binary_path);
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.
std::vector< std::string > binary_path