From cb57ccef4959c7a86fef21711b1f277164676d3a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nikita=20Sizov/AI=20Tools=20Lab=20/SRR/Professional/?= =?utf8?q?=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Mon, 29 Jul 2019 04:07:40 +0300 Subject: [PATCH] Mock ACL NEON nodes for further implementations (#5942) * Add mock functions for ACL NEON nodes Mock: Squeeze, StridedSlice, Transpose, Div, Exp, ReduceMax and Comparison Signed-off-by: Sizov Nikita * Use unused variables in mocked functions Signed-off-by: Sizov Nikita --- .../neurun/backend/acl_neon/KernelGenerator.cc | 42 ++++++++++++++++++++++ runtimes/neurun/backend/acl_neon/KernelGenerator.h | 7 ++++ 2 files changed, 49 insertions(+) diff --git a/runtimes/neurun/backend/acl_neon/KernelGenerator.cc b/runtimes/neurun/backend/acl_neon/KernelGenerator.cc index 83342ad..40743e9 100644 --- a/runtimes/neurun/backend/acl_neon/KernelGenerator.cc +++ b/runtimes/neurun/backend/acl_neon/KernelGenerator.cc @@ -687,6 +687,12 @@ void KernelGenerator::visit(const model::operation::RSQRTNode &node) _execution_builder->append(asAclFunction(std::move(fn))); } +void KernelGenerator::visit(const model::operation::SqueezeNode &node) +{ + (void)node; + throw std::runtime_error("Not supported, yet"); +} + void KernelGenerator::visit(const model::operation::TanhNode &node) { const auto output_index{node.getOutputs().at(0)}; @@ -800,6 +806,18 @@ void KernelGenerator::visit(const model::operation::SubNode &node) ActivationBuilder{*_execution_builder}.append(activation, ofm_alloc->handle()); } +void KernelGenerator::visit(const model::operation::StridedSliceNode &node) +{ + (void)node; + throw std::runtime_error("Not supported, yet"); +} + +void KernelGenerator::visit(const model::operation::TransposeNode &node) +{ + (void)node; + throw std::runtime_error("Not supported, yet"); +} + void KernelGenerator::visit(const model::operation::AddNode &node) { const auto ofm_index{node.getOutputs().at(0)}; @@ -828,6 +846,30 @@ void KernelGenerator::visit(const model::operation::AddNode &node) ActivationBuilder{*_execution_builder}.append(activation, ofm_alloc->handle()); } +void KernelGenerator::visit(const model::operation::DivNode &node) +{ + (void)node; + throw std::runtime_error("Not supported, yet"); +} + +void KernelGenerator::visit(const model::operation::ExpNode &node) +{ + (void)node; + throw std::runtime_error("Not supported, yet"); +} + +void KernelGenerator::visit(const model::operation::ReduceMaxNode &node) +{ + (void)node; + throw std::runtime_error("Not supported, yet"); +} + +void KernelGenerator::visit(const model::operation::ComparisonNode &node) +{ + (void)node; + throw std::runtime_error("Not supported, yet"); +} + } // namespace acl_neon } // namespace backend } // namespace neurun diff --git a/runtimes/neurun/backend/acl_neon/KernelGenerator.h b/runtimes/neurun/backend/acl_neon/KernelGenerator.h index 4d5750c..a823981 100644 --- a/runtimes/neurun/backend/acl_neon/KernelGenerator.h +++ b/runtimes/neurun/backend/acl_neon/KernelGenerator.h @@ -52,12 +52,19 @@ public: void visit(const model::operation::ReLU6Node &) override; void visit(const model::operation::ReshapeNode &) override; void visit(const model::operation::RSQRTNode &) override; + void visit(const model::operation::SqueezeNode &) override; void visit(const model::operation::TanhNode &) override; void visit(const model::operation::SoftmaxNode &) override; void visit(const model::operation::SQRTNode &) override; void visit(const model::operation::SquaredDifferenceNode &) override; void visit(const model::operation::SubNode &) override; + void visit(const model::operation::StridedSliceNode &) override; + void visit(const model::operation::TransposeNode &) override; void visit(const model::operation::AddNode &) override; + void visit(const model::operation::DivNode &) override; + void visit(const model::operation::ExpNode &) override; + void visit(const model::operation::ReduceMaxNode &) override; + void visit(const model::operation::ComparisonNode &) override; private: const neurun::model::Operands &_ctx; -- 2.7.4