diff options
author | Mohammed Suhail Munshi <MohammedSuhail.Munshi@arm.com> | 2022-09-20 11:49:23 +0100 |
---|---|---|
committer | Mohmun02 <MohammedSuhail.Munshi@arm.com> | 2022-10-12 09:27:42 +0000 |
commit | fa79fda2c797282de3589aaa69b06e065e8a21e0 (patch) | |
tree | 91020783a702c9a3be16dad076bca10321fe04c2 /src/core/helpers/WindowHelpers.h | |
parent | c8cc024603cb1db084227196a52e562bf251d339 (diff) | |
download | ComputeLibrary-fa79fda2c797282de3589aaa69b06e065e8a21e0.tar.gz |
Optimize Neon™ Logistic Activation
- Use a 1d execution window to improve memory access pattern.
Resolves: [COMPMID-5465]
Signed-off-by: Mohammed Suhail Munshi <MohammedSuhail.Munshi@arm.com>
Change-Id: Ida30669ffa06eb002ca43a6edf15e25a6eaad2f6
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/8344
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Gunes Bayir <gunes.bayir@arm.com>
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core/helpers/WindowHelpers.h')
-rw-r--r-- | src/core/helpers/WindowHelpers.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/helpers/WindowHelpers.h b/src/core/helpers/WindowHelpers.h index c9e5a135c0..eccf7f2d18 100644 --- a/src/core/helpers/WindowHelpers.h +++ b/src/core/helpers/WindowHelpers.h @@ -176,6 +176,18 @@ inline Window calculate_max_enlarged_window(const ITensorInfo &info, const Steps return calculate_max_enlarged_window(info.valid_region(), steps, border_size); } +/** Calculate the squashed or maximum window for the given tensor shape. + * + * If the tensor data resides continuously in the memory, the tensor can be interpreted + * as 1D array and all the dimensions can be squashed together into the x-dimension. + * Otherwise, generate the max window for the given tensor shape. + * + * @param[in] src Tensor info object defining the shape of the input tensor. + * + * @return The maximum window the kernel can be executed on and the preferred split dimension. + */ +std::pair<Window, size_t> calculate_squashed_or_max_window(const ITensorInfo &src); + /** Calculate the squashed or maximum window for the given tensor shapes. * * If the tensor data resides continuously in the memory, the tensor can be interpreted |