[PureACL] NEON Fully_Connected op (#2378)
author윤현식/동작제어Lab(SR)/Principal Engineer/삼성전자 <hyunsik.yoon@samsung.com>
Wed, 22 Aug 2018 05:45:16 +0000 (14:45 +0900)
committer박세희/동작제어Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>
Wed, 22 Aug 2018 05:45:16 +0000 (14:45 +0900)
Added NEON FullyConnected operation. This commit was tested with #2370.

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
runtimes/pure_arm_compute/src/compilation.cc

index 9da8d48..93e6b4e 100644 (file)
@@ -30,6 +30,7 @@
 #include <arm_compute/runtime/NEON/functions/NEPixelWiseMultiplication.h>
 #include <arm_compute/runtime/NEON/functions/NEPoolingLayer.h>
 #include <arm_compute/runtime/NEON/functions/NEActivationLayer.h>
+#include <arm_compute/runtime/NEON/functions/NEFullyConnectedLayer.h>
 
 #include "internal/arm_compute.h"
 #include "internal/arm_compute/Cast.h"
@@ -2128,8 +2129,14 @@ void Planner::visit(const ::internal::tflite::op::FullyConnected::Node &node)
 
       builder.append("FullyConnected", std::move(fn));
     }
-    else
-      throw std::runtime_error("Not supported, yet");
+    else // NEON
+    {
+      auto fn = nnfw::make_unique<::arm_compute::NEFullyConnectedLayer>();
+
+      fn->configure(input_alloc, weight_alloc, bias_alloc, output_alloc);
+
+      builder.append("FullyConnected", std::move(fn));
+    }
 
     ActivationBuilder{builder}.append(param.activation, output_alloc);
   };