aboutsummaryrefslogtreecommitdiff
path: root/src/cpu
diff options
context:
space:
mode:
authorDana Zlotnik <dankir01@e109190.kfn.arm.com>2021-11-10 11:50:58 +0200
committerDana Zlotnik <dana.zlotnik@arm.com>2021-11-16 11:54:34 +0000
commitd7154dbf0f4a347f2f35f2475a893f1631c5ee1a (patch)
tree2a9e3d6ef6eff030f6bccb43650884a7aa3c1941 /src/cpu
parente7a5b0e133b977ef80d31e86f4eb6e94eae5ba17 (diff)
downloadComputeLibrary-d7154dbf0f4a347f2f35f2475a893f1631c5ee1a.tar.gz
Implement 1D Adaptive Workload Splitting in CPPScheduler
Resolves COMPMID-4649 Change-Id: I941d2f8a40737ff05c49f6695a42884731ef2dc9 Signed-off-by: Dana Zlotnik <dana.zlotnik@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/6656 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: SiCong Li <sicong.li@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/cpu')
-rw-r--r--src/cpu/kernels/CpuActivationKernel.cpp13
-rw-r--r--src/cpu/kernels/CpuAddKernel.cpp13
-rw-r--r--src/cpu/kernels/CpuIm2ColKernel.cpp13
-rw-r--r--src/cpu/kernels/CpuReshapeKernel.cpp13
-rw-r--r--src/cpu/kernels/assembly/CpuGemmAssemblyWrapperKernel.h15
-rw-r--r--src/cpu/kernels/internal/CpuDepthwiseConv2dAssemblyWrapperKernel.cpp13
-rw-r--r--src/cpu/kernels/internal/CpuPool2dAssemblyWrapperKernel.cpp13
7 files changed, 71 insertions, 22 deletions
diff --git a/src/cpu/kernels/CpuActivationKernel.cpp b/src/cpu/kernels/CpuActivationKernel.cpp
index 70ab06fc8a..4a6468d022 100644
--- a/src/cpu/kernels/CpuActivationKernel.cpp
+++ b/src/cpu/kernels/CpuActivationKernel.cpp
@@ -232,9 +232,16 @@ Status CpuActivationKernel::validate(const ITensorInfo *src, const ITensorInfo *
size_t CpuActivationKernel::get_mws(const CPUInfo &platform, size_t thread_count) const
{
- ARM_COMPUTE_UNUSED(platform, thread_count);
-
- return ICPPKernel::small_network_mws;
+ ARM_COMPUTE_UNUSED(thread_count);
+ // Tuning results that gave optimized results in performance investigation
+ if (platform.get_cpu_model() == CPUModel::A73 )
+ {
+ return 10240;
+ }
+ else
+ {
+ return 9216;
+ }
}
void CpuActivationKernel::run_op(ITensorPack &tensors, const Window &window, const ThreadInfo &info)
diff --git a/src/cpu/kernels/CpuAddKernel.cpp b/src/cpu/kernels/CpuAddKernel.cpp
index 77aa1ffb3f..73c1fda711 100644
--- a/src/cpu/kernels/CpuAddKernel.cpp
+++ b/src/cpu/kernels/CpuAddKernel.cpp
@@ -294,9 +294,16 @@ const char *CpuAddKernel::name() const
size_t CpuAddKernel::get_mws(const CPUInfo &platform, size_t thread_count) const
{
- ARM_COMPUTE_UNUSED(platform, thread_count);
-
- return ICPPKernel::small_network_mws;
+ ARM_COMPUTE_UNUSED(thread_count);
+ // Tuning results that gave optimized results in performance investigation
+ if (platform.get_cpu_model() == CPUModel::A73 )
+ {
+ return 10240;
+ }
+ else
+ {
+ return 9216;
+ }
}
} // namespace kernels
diff --git a/src/cpu/kernels/CpuIm2ColKernel.cpp b/src/cpu/kernels/CpuIm2ColKernel.cpp
index 5e3385d4ab..ecd1748a44 100644
--- a/src/cpu/kernels/CpuIm2ColKernel.cpp
+++ b/src/cpu/kernels/CpuIm2ColKernel.cpp
@@ -446,9 +446,16 @@ const char *CpuIm2ColKernel::name() const
size_t CpuIm2ColKernel::get_mws(const CPUInfo &platform, size_t thread_count) const
{
- ARM_COMPUTE_UNUSED(platform, thread_count);
-
- return ICPPKernel::small_network_mws;
+ ARM_COMPUTE_UNUSED(thread_count);
+ // Tuning results that gave optimized results in performance investigation
+ if (platform.get_cpu_model() == CPUModel::A73 )
+ {
+ return 10240;
+ }
+ else
+ {
+ return 9216;
+ }
}
} // namespace kernels
} // namespace cpu
diff --git a/src/cpu/kernels/CpuReshapeKernel.cpp b/src/cpu/kernels/CpuReshapeKernel.cpp
index 91c549643f..e19707dd0c 100644
--- a/src/cpu/kernels/CpuReshapeKernel.cpp
+++ b/src/cpu/kernels/CpuReshapeKernel.cpp
@@ -137,9 +137,16 @@ const char *CpuReshapeKernel::name() const
size_t CpuReshapeKernel::get_mws(const CPUInfo &platform, size_t thread_count) const
{
- ARM_COMPUTE_UNUSED(platform, thread_count);
-
- return ICPPKernel::small_network_mws;
+ ARM_COMPUTE_UNUSED(thread_count);
+ // Tuning results that gave optimized results in performance investigation
+ if (platform.get_cpu_model() == CPUModel::A73 )
+ {
+ return 10240;
+ }
+ else
+ {
+ return 9216;
+ }
}
} // namespace kernels
diff --git a/src/cpu/kernels/assembly/CpuGemmAssemblyWrapperKernel.h b/src/cpu/kernels/assembly/CpuGemmAssemblyWrapperKernel.h
index ff8b0b143f..47548b2538 100644
--- a/src/cpu/kernels/assembly/CpuGemmAssemblyWrapperKernel.h
+++ b/src/cpu/kernels/assembly/CpuGemmAssemblyWrapperKernel.h
@@ -120,13 +120,20 @@ public:
* @param[in] platform The CPU platform used to create the context.
* @param[in] thread_count Number of threads in the execution.
*
- * @return[out] small_network_mws Minimum workload size for requsted configuration.
+ * @return[out] small_network_mws Minimum workload size for requested configuration.
*/
size_t get_mws(const CPUInfo &platform, size_t thread_count) const override
{
- ARM_COMPUTE_UNUSED(platform, thread_count);
-
- return ICPPKernel::small_network_mws;
+ ARM_COMPUTE_UNUSED(thread_count);
+ // Tuning results that gave optimized results in performance investigation
+ if (platform.get_cpu_model() == CPUModel::A73 )
+ {
+ return 3072;
+ }
+ else
+ {
+ return 4096;
+ }
}
private:
diff --git a/src/cpu/kernels/internal/CpuDepthwiseConv2dAssemblyWrapperKernel.cpp b/src/cpu/kernels/internal/CpuDepthwiseConv2dAssemblyWrapperKernel.cpp
index a71864c10c..934e38b054 100644
--- a/src/cpu/kernels/internal/CpuDepthwiseConv2dAssemblyWrapperKernel.cpp
+++ b/src/cpu/kernels/internal/CpuDepthwiseConv2dAssemblyWrapperKernel.cpp
@@ -357,9 +357,16 @@ const char *CpuDepthwiseConv2dAssemblyWrapperKernel::name() const
size_t CpuDepthwiseConv2dAssemblyWrapperKernel::get_mws(const CPUInfo &platform, size_t thread_count) const
{
- ARM_COMPUTE_UNUSED(platform, thread_count);
-
- return ICPPKernel::small_network_mws;
+ ARM_COMPUTE_UNUSED(thread_count);
+ // Tuning results that gave optimized results in performance investigation
+ if (platform.get_cpu_model() == CPUModel::A73 )
+ {
+ return 10240;
+ }
+ else
+ {
+ return 9216;
+ }
}
} // namespace kernels
} // namespace cpu
diff --git a/src/cpu/kernels/internal/CpuPool2dAssemblyWrapperKernel.cpp b/src/cpu/kernels/internal/CpuPool2dAssemblyWrapperKernel.cpp
index f9c11fd4bd..78ac134604 100644
--- a/src/cpu/kernels/internal/CpuPool2dAssemblyWrapperKernel.cpp
+++ b/src/cpu/kernels/internal/CpuPool2dAssemblyWrapperKernel.cpp
@@ -277,9 +277,16 @@ void CpuPool2dAssemblyWrapperKernel::create_arm_pooling_requant(const ITensorInf
size_t CpuPool2dAssemblyWrapperKernel::get_mws(const CPUInfo &platform, size_t thread_count) const
{
- ARM_COMPUTE_UNUSED(platform, thread_count);
-
- return ICPPKernel::small_network_mws;
+ ARM_COMPUTE_UNUSED(thread_count);
+ // Tuning results that gave optimized results in performance investigation
+ if (platform.get_cpu_model() == CPUModel::A73 )
+ {
+ return 10240;
+ }
+ else
+ {
+ return 9216;
+ }
}
} // namespace kernels
} // namespace cpu