aboutsummaryrefslogtreecommitdiff
path: root/src/cpu/kernels/CpuActivationKernel.h
diff options
context:
space:
mode:
authorMohammed Suhail Munshi <MohammedSuhail.Munshi@arm.com>2022-09-20 11:49:23 +0100
committerMohmun02 <MohammedSuhail.Munshi@arm.com>2022-10-12 09:27:42 +0000
commitfa79fda2c797282de3589aaa69b06e065e8a21e0 (patch)
tree91020783a702c9a3be16dad076bca10321fe04c2 /src/cpu/kernels/CpuActivationKernel.h
parentc8cc024603cb1db084227196a52e562bf251d339 (diff)
downloadComputeLibrary-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/cpu/kernels/CpuActivationKernel.h')
-rw-r--r--src/cpu/kernels/CpuActivationKernel.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cpu/kernels/CpuActivationKernel.h b/src/cpu/kernels/CpuActivationKernel.h
index d856a9357f..fe2d783059 100644
--- a/src/cpu/kernels/CpuActivationKernel.h
+++ b/src/cpu/kernels/CpuActivationKernel.h
@@ -73,6 +73,15 @@ public:
void run_op(ITensorPack &tensors, const Window &window, const ThreadInfo &info) override;
const char *name() const override;
+ /** Get the preferred dimension in which the scheduler splits the work into multiple jobs.
+ *
+ * @return The split dimension hint.
+ */
+ size_t get_split_dimension_hint() const
+ {
+ return _split_dimension;
+ }
+
struct ActivationKernel
{
const char *name;
@@ -85,6 +94,7 @@ public:
private:
ActivationLayerInfo _act_info{};
ActivationKernelPtr _run_method{ nullptr };
+ size_t _split_dimension{ Window::DimY };
std::string _name{};
};
} // namespace kernels