From ddad9b410faea3786725d215a284cdbcd4eaa680 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=B0=95=EC=84=B8=ED=9D=AC/=EB=8F=99=EC=9E=91=EC=A0=9C?= =?utf8?q?=EC=96=B4Lab=28SR=29/Principal=20Engineer/=EC=82=BC=EC=84=B1?= =?utf8?q?=EC=A0=84=EC=9E=90?= Date: Wed, 11 Apr 2018 15:07:13 +0900 Subject: [PATCH] Gather acl kernel operator prototypes (#569) * Gather acl kernel operator prototypes This will gather acl kernel operator prototypes to root include folder Signed-off-by: SaeHie Park * add reshape --- include/kernel/acl/FullyConnected.h | 19 +++++++++++++++++++ include/kernel/acl/Reshape.h | 16 ++++++++++++++++ src/kernel/acl/src/cl/Conv2D_acl.test.cpp | 10 +--------- src/kernel/acl/src/cl/FullyConnected.test.cpp | 14 +------------- src/kernel/acl/src/cl/Reshape.test.cpp | 11 +---------- 5 files changed, 38 insertions(+), 32 deletions(-) create mode 100644 include/kernel/acl/FullyConnected.h create mode 100644 include/kernel/acl/Reshape.h diff --git a/include/kernel/acl/FullyConnected.h b/include/kernel/acl/FullyConnected.h new file mode 100644 index 0000000..30e4d1c --- /dev/null +++ b/include/kernel/acl/FullyConnected.h @@ -0,0 +1,19 @@ +#ifndef __NNFW_KERNEL_ACL_FULLYCONNECTED_H__ +#define __NNFW_KERNEL_ACL_FULLYCONNECTED_H__ + +#include + +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 index 0000000..8b10a77 --- /dev/null +++ b/include/kernel/acl/Reshape.h @@ -0,0 +1,16 @@ +#ifndef __NNFW_KERNEL_ACL_RESHAPE_H__ +#define __NNFW_KERNEL_ACL_RESHAPE_H__ + +#include + +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__ diff --git a/src/kernel/acl/src/cl/Conv2D_acl.test.cpp b/src/kernel/acl/src/cl/Conv2D_acl.test.cpp index f5a7348..ac946de 100644 --- a/src/kernel/acl/src/cl/Conv2D_acl.test.cpp +++ b/src/kernel/acl/src/cl/Conv2D_acl.test.cpp @@ -1,6 +1,7 @@ #include #include #include +#include // 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); diff --git a/src/kernel/acl/src/cl/FullyConnected.test.cpp b/src/kernel/acl/src/cl/FullyConnected.test.cpp index 7647c38..20e1171 100644 --- a/src/kernel/acl/src/cl/FullyConnected.test.cpp +++ b/src/kernel/acl/src/cl/FullyConnected.test.cpp @@ -1,23 +1,11 @@ #include #include #include +#include // 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) { diff --git a/src/kernel/acl/src/cl/Reshape.test.cpp b/src/kernel/acl/src/cl/Reshape.test.cpp index 39e77ba..83212cb 100644 --- a/src/kernel/acl/src/cl/Reshape.test.cpp +++ b/src/kernel/acl/src/cl/Reshape.test.cpp @@ -1,20 +1,11 @@ #include #include #include +#include // 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) { -- 2.7.4