diff options
author | Mohammed Suhail Munshi <MohammedSuhail.Munshi@arm.com> | 2022-11-09 15:38:54 +0000 |
---|---|---|
committer | Suhail Munshi <MohammedSuhail.Munshi@arm.com> | 2022-11-15 11:45:48 +0000 |
commit | 8307ecf74d2cdbee284faef1cc108ad62742e883 (patch) | |
tree | 60396f8122db754c570dddfe0869f10507cd9f89 /src | |
parent | 97a609bb9b2ad22a2ebd54493cd1374f0992eb52 (diff) | |
download | ComputeLibrary-8307ecf74d2cdbee284faef1cc108ad62742e883.tar.gz |
Fix regression caused by mws in ActivationLayer
- Regression is caused by the small default mws in ActivationLayer
- Syncronization of threads takes longer than the workload on small sized tensors.
- Size 1536 is chosen arbitrarily based on the size of tensors in benchmarked networks
Resolves: [COMPMID-5655]
Signed-off-by: Mohammed Suhail Munshi <MohammedSuhail.Munshi@arm.com>
Change-Id: I02e865b578399e75484f471e67806dd4cf7502c0
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/c/VisualCompute/ComputeLibrary/+/468454
Comments-Addressed: bsgcomp <bsgcomp@arm.com>
Tested-by: bsgcomp <bsgcomp@arm.com>
Reviewed-by: Jakub Sujak <jakub.sujak@arm.com>
Reviewed-by: Gunes Bayir <gunes.bayir@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/8615
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/cpu/kernels/CpuActivationKernel.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/cpu/kernels/CpuActivationKernel.cpp b/src/cpu/kernels/CpuActivationKernel.cpp index c7e1075bfd..04a9731f4a 100644 --- a/src/cpu/kernels/CpuActivationKernel.cpp +++ b/src/cpu/kernels/CpuActivationKernel.cpp @@ -233,7 +233,13 @@ size_t CpuActivationKernel::get_mws(const CPUInfo &platform, size_t thread_count ARM_COMPUTE_UNUSED(thread_count); ARM_COMPUTE_UNUSED(platform); - return ICPPKernel::default_mws; + if(_split_dimension == Window::DimX) + { + // Don't split the work load too small if the tensor has been reinterpreted as 1D. + // This number is loosely chosen as threading overhead in each platform varies wildly. + return 1536; + } + return default_mws; } void CpuActivationKernel::run_op(ITensorPack &tensors, const Window &window, const ThreadInfo &info) |