Gather acl kernel operator prototypes (#569)
author박세희/동작제어Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>
Wed, 11 Apr 2018 06:07:13 +0000 (15:07 +0900)
committer김정현/동작제어Lab(SR)/Senior Engineer/삼성전자 <jh0822.kim@samsung.com>
Wed, 11 Apr 2018 06:07:13 +0000 (15:07 +0900)
* Gather acl kernel operator prototypes

This will gather acl kernel operator prototypes to root include folder

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
* add reshape

include/kernel/acl/FullyConnected.h [new file with mode: 0644]
include/kernel/acl/Reshape.h [new file with mode: 0644]
src/kernel/acl/src/cl/Conv2D_acl.test.cpp
src/kernel/acl/src/cl/FullyConnected.test.cpp
src/kernel/acl/src/cl/Reshape.test.cpp

diff --git a/include/kernel/acl/FullyConnected.h b/include/kernel/acl/FullyConnected.h
new file mode 100644 (file)
index 0000000..30e4d1c
--- /dev/null
@@ -0,0 +1,19 @@
+#ifndef __NNFW_KERNEL_ACL_FULLYCONNECTED_H__
+#define __NNFW_KERNEL_ACL_FULLYCONNECTED_H__
+
+#include <OperationsUtils.h>
+
+namespace nnfw {
+namespace kernel {
+namespace acl {
+
+bool fullyConnectedFloat32(const float* inputData, const android::nn::Shape& inputShape,
+                           const float* weightsData, const android::nn::Shape& weightsShape,
+                           const float* biasData, const android::nn::Shape& biasShape,
+                           int32_t activation,
+                           float* outputData, const android::nn::Shape& outputShape);
+} // namespace acl
+} // namespace kernel
+} // namespace nnfw
+
+#endif // __NNFW_KERNEL_ACL_FULLYCONNECTED_H__
diff --git a/include/kernel/acl/Reshape.h b/include/kernel/acl/Reshape.h
new file mode 100644 (file)
index 0000000..8b10a77
--- /dev/null
@@ -0,0 +1,16 @@
+#ifndef __NNFW_KERNEL_ACL_RESHAPE_H__
+#define __NNFW_KERNEL_ACL_RESHAPE_H__
+
+#include <OperationsUtils.h>
+
+namespace nnfw {
+namespace kernel {
+namespace acl {
+
+bool reshapeGeneric(const void* inputData, const android::nn::Shape& inputShape,
+                    void* outputData, const android::nn::Shape& outputShape);
+} // namespace acl
+} // namespace kernel
+} // namespace nnfw
+
+#endif // __NNFW_KERNEL_ACL_RESHAPE_H__
index f5a7348..ac946de 100644 (file)
@@ -1,6 +1,7 @@
 #include <gtest/gtest.h>
 #include <OperationsUtils.h>
 #include <kernel/acl/nnfw_kernel_acl.h>
+#include <kernel/acl/Conv2D.h>
 
 // TODO: fix include path in CMakeFiles
 #include "../util.h"
@@ -9,15 +10,6 @@ namespace nnfw {
 namespace kernel {
 namespace acl {
 
-bool convFloat32(const float* inputData, const android::nn::Shape& inputShape,
-                 const float* filterData, const android::nn::Shape& filterShape,
-                 const float* biasData, const android::nn::Shape& biasShape,
-                 int32_t padding_left, int32_t padding_right,
-                 int32_t padding_top, int32_t padding_bottom,
-                 int32_t stride_width, int32_t stride_height,
-                 int32_t activation,
-                 float* outputData, const android::nn::Shape& outputShape);
-
 // TODO move to separate header
 void NCHW2NHWC(const float* nchw, float* nhwc, const android::nn::Shape& shape);
 
index 7647c38..20e1171 100644 (file)
@@ -1,23 +1,11 @@
 #include <gtest/gtest.h>
 #include <OperationsUtils.h>
 #include <kernel/acl/nnfw_kernel_acl.h>
+#include <kernel/acl/FullyConnected.h>
 
 // TODO: fix include path in CMakeFiles
 #include "../util.h"
 
-namespace nnfw {
-namespace kernel {
-namespace acl {
-
-bool fullyConnectedFloat32(const float* inputData, const android::nn::Shape& inputShape,
-                           const float* weightsData, const android::nn::Shape& weightsShape,
-                           const float* biasData, const android::nn::Shape& biasShape,
-                           int32_t activation,
-                           float* outputData, const android::nn::Shape& outputShape);
-} // namespace acl
-} // namespace kernel
-} // namespace nnfw
-
 using namespace nnfw::kernel::acl;
 
 TEST(KernelACL_TC, fcFloat32_1) {
index 39e77ba..83212cb 100644 (file)
@@ -1,20 +1,11 @@
 #include <gtest/gtest.h>
 #include <OperationsUtils.h>
 #include <kernel/acl/nnfw_kernel_acl.h>
+#include <kernel/acl/Reshape.h>
 
 // TODO: fix include path in CMakeFiles
 #include "../util.h"
 
-namespace nnfw {
-namespace kernel {
-namespace acl {
-
-bool reshapeGeneric(const void* inputData, const android::nn::Shape& inputShape,
-                    void* outputData, const android::nn::Shape& outputShape);
-} // namespace acl
-} // namespace kernel
-} // namespace nnfw
-
 using namespace nnfw::kernel::acl;
 
 TEST(KernelACL_TC, reshape_1) {