diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2017-09-15 19:06:47 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:35:24 +0000 |
commit | 8a94e7cec7b09a417a278425e2b56e7af5bf45d9 (patch) | |
tree | e952f39903d4624bbd6445c9cc6c7dbcc1114026 /src/runtime/CL/functions/CLL2Normalize.cpp | |
parent | 658039bc4e06be34272eccf559a516a6b52f75f5 (diff) | |
download | ComputeLibrary-8a94e7cec7b09a417a278425e2b56e7af5bf45d9.tar.gz |
COMPMID-534: Add MemoryManager support in OpenCL functions
Adds support for:
-CLConvolution
-CLGEMM
-CLGEMMLowp
-CLHOGDescriptor
-CLHOGGradient
-CLHOGMultiDetection
-CLL2Normalize
-CLLocallyConnectedLayer
-CLOpticalFlow
-CLReductionOperation
Change-Id: Ib13354d274ccf32ae933f3fbbad3ac3896cfd3bd
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/87938
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Pablo Tello <pablo.tello@arm.com>
Diffstat (limited to 'src/runtime/CL/functions/CLL2Normalize.cpp')
-rw-r--r-- | src/runtime/CL/functions/CLL2Normalize.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/runtime/CL/functions/CLL2Normalize.cpp b/src/runtime/CL/functions/CLL2Normalize.cpp index 18d05beba2..99be8cae4c 100644 --- a/src/runtime/CL/functions/CLL2Normalize.cpp +++ b/src/runtime/CL/functions/CLL2Normalize.cpp @@ -34,13 +34,16 @@ using namespace arm_compute; -CLL2Normalize::CLL2Normalize() - : _reduce_func(), _normalize_kernel(), _sumsq() +CLL2Normalize::CLL2Normalize(std::shared_ptr<IMemoryManager> memory_manager) + : _memory_group(std::move(memory_manager)), _reduce_func(), _normalize_kernel(), _sumsq() { } void CLL2Normalize::configure(ICLTensor *input, ICLTensor *output, unsigned int axis, float epsilon) { + // Manage intermediate buffers + _memory_group.manage(&_sumsq); + // Configure kernels _reduce_func.configure(input, &_sumsq, axis, ReductionOperation::SUM_SQUARE); _normalize_kernel.configure(input, &_sumsq, output, axis, epsilon); @@ -51,6 +54,10 @@ void CLL2Normalize::configure(ICLTensor *input, ICLTensor *output, unsigned int void CLL2Normalize::run() { + _memory_group.acquire(); + _reduce_func.run(); CLScheduler::get().enqueue(_normalize_kernel, true); + + _memory_group.release(); } |