diff options
author | Michalis Spyrou <michalis.spyrou@arm.com> | 2018-03-15 14:41:34 +0000 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:49:16 +0000 |
commit | 9e9cbafa9e6cc6b543c89a96d52fc9c5fde04ceb (patch) | |
tree | eb8ae82627c447e530e2745788c371f708c887a5 /src/runtime/GLES_COMPUTE/functions/GCGEMM.cpp | |
parent | be0ae93c50bfa3e588111585025278daa8cb0694 (diff) | |
download | ComputeLibrary-9e9cbafa9e6cc6b543c89a96d52fc9c5fde04ceb.tar.gz |
COMPMID-1004 GLES: Add memory manager to GLES functions
Change-Id: I80fc9c0dd02afd79b501abde751036f9599b7bf2
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/125103
Tested-by: Jenkins <bsgcomp@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'src/runtime/GLES_COMPUTE/functions/GCGEMM.cpp')
-rw-r--r-- | src/runtime/GLES_COMPUTE/functions/GCGEMM.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/runtime/GLES_COMPUTE/functions/GCGEMM.cpp b/src/runtime/GLES_COMPUTE/functions/GCGEMM.cpp index 5122c20504..46424a59f5 100644 --- a/src/runtime/GLES_COMPUTE/functions/GCGEMM.cpp +++ b/src/runtime/GLES_COMPUTE/functions/GCGEMM.cpp @@ -40,8 +40,8 @@ using namespace arm_compute; using namespace arm_compute::gles_compute; -GCGEMM::GCGEMM() - : _interleave_kernel(), _transpose_kernel(), _mm_kernel(), _ma_kernel(), _tmp_a(), _tmp_b(), _is_interleaved_transposed(false), _run_addition(false) +GCGEMM::GCGEMM(std::shared_ptr<IMemoryManager> memory_manager) + : _memory_group(std::move(memory_manager)), _interleave_kernel(), _transpose_kernel(), _mm_kernel(), _ma_kernel(), _tmp_a(), _tmp_b(), _is_interleaved_transposed(false), _run_addition(false) { } @@ -88,6 +88,7 @@ void GCGEMM::configure(const IGCTensor *a, const IGCTensor *b, const IGCTensor * TensorInfo info_a(shape_tmp_a, 1, a->info()->data_type(), a->info()->fixed_point_position()); _tmp_a.allocator()->init(info_a); + _memory_group.manage(&_tmp_a); TensorInfo info_b(shape_tmp_b, 1, b->info()->data_type(), b->info()->fixed_point_position()); _tmp_b.allocator()->init(info_b); @@ -118,6 +119,7 @@ void GCGEMM::configure(const IGCTensor *a, const IGCTensor *b, const IGCTensor * void GCGEMM::run() { + _memory_group.acquire(); if(_is_interleaved_transposed) { // Run interleave kernel @@ -137,4 +139,5 @@ void GCGEMM::run() GCScheduler::get().memory_barrier(); GCScheduler::get().dispatch(_ma_kernel); } + _memory_group.release(); } |