aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGunes Bayir <gunes.bayir@arm.com>2022-11-29 13:12:08 +0000
committerGunes Bayir <gunes.bayir@arm.com>2022-11-30 11:56:27 +0000
commitf16973b8b4605f12608bffa9f0ca6ed590202d41 (patch)
treede17199fd7b8cddb9ffcfdcc21285e4cf166c126
parent404462af4ca002ece819161a03a4bdb19a87abf2 (diff)
downloadComputeLibrary-f16973b8b4605f12608bffa9f0ca6ed590202d41.tar.gz
Fix build error for unused variables in data type specific builds
The fp32 mws selection variables are guarded because they are flagged as unused when data type support does not include fp32. Resolves: COMPMID-5761 Change-Id: I7ac783e3d5ca51868b562ab879d03e02140b51a1 Signed-off-by: Gunes Bayir <gunes.bayir@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/8707 Reviewed-by: Jakub Sujak <jakub.sujak@arm.com> Reviewed-by: Pablo Marquez Tello <pablo.tello@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
-rw-r--r--src/cpu/kernels/CpuAddKernel.cpp3
-rw-r--r--src/cpu/kernels/CpuElementwiseKernel.cpp2
-rw-r--r--src/cpu/kernels/CpuMulKernel.cpp2
-rw-r--r--src/cpu/kernels/CpuSubKernel.cpp3
4 files changed, 10 insertions, 0 deletions
diff --git a/src/cpu/kernels/CpuAddKernel.cpp b/src/cpu/kernels/CpuAddKernel.cpp
index ec210a4a71..2983575cb6 100644
--- a/src/cpu/kernels/CpuAddKernel.cpp
+++ b/src/cpu/kernels/CpuAddKernel.cpp
@@ -33,11 +33,14 @@
#include "src/cpu/kernels/add/list.h"
#include <array>
+#if defined(ENABLE_FP32_KERNELS)
namespace
{
static constexpr size_t default_mws_N1_fp32_neon = 24536;
static constexpr size_t default_mws_V1_fp32_neon = 40510;
}
+#endif /* ENABLE_FP32_KERNELS */
+
namespace arm_compute
{
namespace cpu
diff --git a/src/cpu/kernels/CpuElementwiseKernel.cpp b/src/cpu/kernels/CpuElementwiseKernel.cpp
index e76b05f296..a045855b1a 100644
--- a/src/cpu/kernels/CpuElementwiseKernel.cpp
+++ b/src/cpu/kernels/CpuElementwiseKernel.cpp
@@ -32,6 +32,7 @@
#include <arm_neon.h>
+#if defined(ENABLE_FP32_KERNELS)
namespace
{
static constexpr size_t default_min_max_mws_N1_fp32_neon = 25308;
@@ -39,6 +40,7 @@ namespace
static constexpr size_t default_div_mws_N1_fp32_neon = 19043;
static constexpr size_t default_div_mws_V1_fp32_neon = 25511;
}
+#endif /* ENABLE_FP32_KERNELS */
namespace arm_compute
{
diff --git a/src/cpu/kernels/CpuMulKernel.cpp b/src/cpu/kernels/CpuMulKernel.cpp
index cc7efe0a1d..b73d2bdf73 100644
--- a/src/cpu/kernels/CpuMulKernel.cpp
+++ b/src/cpu/kernels/CpuMulKernel.cpp
@@ -36,8 +36,10 @@
namespace
{
+#if defined(ENABLE_FP32_KERNELS)
static constexpr size_t default_mws_N1_fp32_neon = 22447;
static constexpr size_t default_mws_V1_fp32_neon = 38982;
+#endif /* ENABLE_FP32_KERNELS */
static constexpr size_t default_mws_other_platforms_1d_tensor = 10240;
}
namespace arm_compute
diff --git a/src/cpu/kernels/CpuSubKernel.cpp b/src/cpu/kernels/CpuSubKernel.cpp
index ad74dda85d..37a087f115 100644
--- a/src/cpu/kernels/CpuSubKernel.cpp
+++ b/src/cpu/kernels/CpuSubKernel.cpp
@@ -31,11 +31,14 @@
#include "src/core/helpers/WindowHelpers.h"
#include "src/cpu/kernels/sub/neon/list.h"
+#if defined(ENABLE_FP32_KERNELS)
namespace
{
static constexpr size_t default_mws_N1_fp32_neon = 24385;
static constexpr size_t default_mws_V1_fp32_neon = 40520;
}
+#endif /* ENABLE_FP32_KERNELS */
+
namespace arm_compute
{
namespace cpu