diff options
author | Michael Tyler <michael.tyler@arm.com> | 2023-06-30 11:26:05 +0100 |
---|---|---|
committer | michael.tyler <michael.tyler@arm.com> | 2023-07-04 14:34:58 +0000 |
commit | 8deee9bd9b9137c256c23b86be11dbf0466f3aa8 (patch) | |
tree | ac80b3bdd992552b65e306b77f061484da0591ca /src/core/NEON/kernels/arm_conv/pooling/pooling_depthfirst.hpp | |
parent | 19844f605f5e5b71d05164711dee13f8652adafe (diff) | |
download | ComputeLibrary-8deee9bd9b9137c256c23b86be11dbf0466f3aa8.tar.gz |
Depthwise channel pre-multiplication
Resolves: COMPMID-6337
Change-Id: Ie9097b3f56e8071426c621386a5988bd7f7e8ef2
Signed-off-by: Michael Tyler <michael.tyler@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9852
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Viet-Hoa Do <viet-hoa.do@arm.com>
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core/NEON/kernels/arm_conv/pooling/pooling_depthfirst.hpp')
-rw-r--r-- | src/core/NEON/kernels/arm_conv/pooling/pooling_depthfirst.hpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/NEON/kernels/arm_conv/pooling/pooling_depthfirst.hpp b/src/core/NEON/kernels/arm_conv/pooling/pooling_depthfirst.hpp index 8a6e63d993..1ca478513c 100644 --- a/src/core/NEON/kernels/arm_conv/pooling/pooling_depthfirst.hpp +++ b/src/core/NEON/kernels/arm_conv/pooling/pooling_depthfirst.hpp @@ -91,17 +91,17 @@ class PoolingDepthfirst : public DepthfirstDriver<TInput, TOutput> protected: /* Compute the amount of working space required for a single thread. */ - size_t get_working_size_per_thread(unsigned int n_channels) const override + size_t get_working_size_per_thread() const override { - return sizeof(WorkingSpace) + n_channels * (sizeof(TInput) + sizeof(TOutput)); + return sizeof(WorkingSpace) + this->m_args.n_channels * (sizeof(TInput) + sizeof(TOutput)); } /* Initialise the working space for a thread. */ - void initialise_working_space(void *raw_ws, unsigned int n_channels) const override + void initialise_working_space(void *raw_ws) const override { auto ws = reinterpret_cast<WorkingSpace *>(raw_ws); ws->input_buffer = ws + 1; - ws->output_buffer = reinterpret_cast<char *>(ws + 1) + sizeof(TInput) * n_channels; + ws->output_buffer = reinterpret_cast<char *>(ws + 1) + sizeof(TInput) * this->m_args.n_channels; // Fill the input buffer with an appropriate value TInput fill_val = 0; @@ -119,6 +119,7 @@ class PoolingDepthfirst : public DepthfirstDriver<TInput, TOutput> } auto ptr = reinterpret_cast<TInput *>(ws->input_buffer); + auto n_channels = this->m_args.n_channels; for (; n_channels; n_channels--) { *(ptr++) = fill_val; |