diff options
author | Manuel Bottini <manuel.bottini@arm.com> | 2021-06-09 16:37:32 +0100 |
---|---|---|
committer | Manuel Bottini <manuel.bottini@arm.com> | 2021-06-15 16:31:27 +0000 |
commit | 94f799e8f6f605333d40472860fb472e8ba6d83d (patch) | |
tree | ce528244814463ed42dc86a84d54ea870c75d592 /src/runtime/cpu/operators/CpuPool2d.cpp | |
parent | 36dff9f81e3a95aea19fcc7246a4896930a14bc6 (diff) | |
download | ComputeLibrary-94f799e8f6f605333d40472860fb472e8ba6d83d.tar.gz |
Fix incorrect memory handling in ported functions
Details of the functions:
- ClSoftmax
- CpuSoftmax
- CpuPool2d
Change-Id: Icd2c14d5df010c3b2301e2693ce6f414d7c61916
Resolves: COMPMID-4404
Signed-off-by: Manuel Bottini <manuel.bottini@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5797
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/runtime/cpu/operators/CpuPool2d.cpp')
-rw-r--r-- | src/runtime/cpu/operators/CpuPool2d.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/runtime/cpu/operators/CpuPool2d.cpp b/src/runtime/cpu/operators/CpuPool2d.cpp index b225199c40..e746c8fb3b 100644 --- a/src/runtime/cpu/operators/CpuPool2d.cpp +++ b/src/runtime/cpu/operators/CpuPool2d.cpp @@ -30,6 +30,8 @@ #include "src/core/cpu/kernels/CpuPool2dKernel.h" #include "src/core/cpu/kernels/internal/CpuPool2dAssemblyWrapperKernel.h" +using namespace arm_compute::experimental; + namespace arm_compute { namespace cpu @@ -40,7 +42,7 @@ CpuPool2d::CpuPool2d() _asm_glue(), _is_global_pooling_layer(false), _data_layout(DataLayout::NCHW), - _mem_req() + _aux_mem(1) { } @@ -71,7 +73,7 @@ void CpuPool2d::configure(ITensorInfo *src, ITensorInfo *dst, const PoolingLayer // Get kernel's memory requirements constexpr size_t alignment = 4096; const size_t workspace_size = pooling_wrapper->get_working_size(num_threads); - _mem_req.push_back({ TensorType::ACL_INT_0, workspace_size, alignment }); + _aux_mem[0] = MemoryInfo(TensorType::ACL_INT_0, MemoryLifetime::Temporary, workspace_size, alignment); _asm_glue = std::move(pooling_wrapper); } @@ -150,7 +152,7 @@ void CpuPool2d::run(ITensorPack &tensors) experimental::MemoryRequirements CpuPool2d::workspace() const { - return _mem_req; + return _aux_mem; } } // namespace cpu } // namespace arm_compute |