From: 박세희/동작제어Lab(SR)/Principal Engineer/삼성전자 Date: Wed, 11 Apr 2018 06:07:13 +0000 (+0900) Subject: Gather acl kernel operator prototypes (#569) X-Git-Tag: 0.1~331 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ddad9b410faea3786725d215a284cdbcd4eaa680;p=platform%2Fcore%2Fml%2Fnnfw.git 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 --- 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) {