_execution_builder->append(std::move(acl_fn));
}
+void KernelGenerator::visit(const model::operation::L2Pool2DNode &node)
+{
+ const auto ofm_index{node.getOutputs().at(0)};
+ const auto ifm_index{node.getInputs().at(model::operation::L2Pool2DNode::Input::INPUT)};
+
+ const auto ifm_shape = _ctx.at(ifm_index).shape().asFeature(_current_subg_layout);
+ const auto ofm_shape = _ctx.at(ofm_index).shape().asFeature(_current_subg_layout);
+
+ uint32_t kw = node.param().kw;
+ uint32_t kh = node.param().kh;
+ const auto stride = node.param().stride;
+ const auto padding =
+ neurun::util::calculatePadding(node.param().padding, ifm_shape, ofm_shape, stride, kw, kh);
+ const auto activation = node.param().activation;
+
+ auto ofm_alloc = _tensor_builder->at(ofm_index).get();
+ auto ifm_alloc = _tensor_builder->at(ifm_index).get();
+
+ ::arm_compute::PoolingLayerInfo info{
+ ::arm_compute::PoolingType::L2, ::arm_compute::Size2D{kw, kh},
+ ::neurun::backend::acl_common::asPadStrideInfo(padding, stride)};
+
+ std::unique_ptr<::arm_compute::IFunction> fn;
+
+ auto l = nnfw::cpp14::make_unique<::arm_compute::NEPoolingLayer>();
+
+ l->configure(ifm_alloc->handle(), ofm_alloc->handle(), info);
+
+ fn = std::move(l);
+
+ auto acl_fn = asAclFunction(std::move(fn));
+
+ _execution_builder->append(std::move(acl_fn));
+
+ ActivationBuilder{*_execution_builder}.append(activation, ofm_alloc->handle());
+}
+
void KernelGenerator::visit(const model::operation::MulNode &node)
{
const auto ofm_index{node.getOutputs().at(0)};
void visit(const model::operation::FloorNode &) override;
void visit(const model::operation::FullyConnectedNode &) override;
void visit(const model::operation::L2NormalizationNode &) override;
+ void visit(const model::operation::L2Pool2DNode &) override;
void visit(const model::operation::MulNode &) override;
void visit(const model::operation::ReLUNode &) override;
void visit(const model::operation::ReLU1Node &) override;
void visit(const model::operation::FloorNode &) override;
void visit(const model::operation::FullyConnectedNode &) override;
void visit(const model::operation::L2NormalizationNode &) override;
+ void visit(const model::operation::L2Pool2DNode &) override;
void visit(const model::operation::MulNode &) override;
void visit(const model::operation::ReLUNode &) override;
void visit(const model::operation::ReLU1Node &) override;