diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2018-10-11 15:33:11 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:55:45 +0000 |
commit | 9da19e9da660057785fb736aba5c61b1ae773f2f (patch) | |
tree | b51b30bed8266571178834367437bab0d8a7a517 /src/graph/GraphContext.cpp | |
parent | ffb57a05d624c2efe1b32cf6ece112ee28726058 (diff) | |
download | ComputeLibrary-9da19e9da660057785fb736aba5c61b1ae773f2f.tar.gz |
COMPMID-1605: API alignment for the MemoryManager with ARMNN
Change-Id: Iac6a95ba7f388e65b7f1c8865c3e9bf289b233ea
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/155490
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Tested-by: bsgcomp <bsgcomp@arm.com>
Diffstat (limited to 'src/graph/GraphContext.cpp')
-rw-r--r-- | src/graph/GraphContext.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/graph/GraphContext.cpp b/src/graph/GraphContext.cpp index 5f33ed3537..037b40b68b 100644 --- a/src/graph/GraphContext.cpp +++ b/src/graph/GraphContext.cpp @@ -25,6 +25,7 @@ #include "arm_compute/graph.h" #include "arm_compute/graph/Utils.h" +#include "arm_compute/graph/backends/BackendRegistry.h" namespace arm_compute { @@ -75,17 +76,20 @@ std::map<Target, MemoryManagerContext> &GraphContext::memory_managers() void GraphContext::finalize() { + const size_t num_pools = 1; for(auto &mm_obj : _memory_managers) { + ARM_COMPUTE_ERROR_ON(!mm_obj.second.allocator); + // Finalize intra layer memory manager if(mm_obj.second.intra_mm != nullptr) { - mm_obj.second.intra_mm->finalize(); + mm_obj.second.intra_mm->populate(*mm_obj.second.allocator, num_pools); } // Finalize cross layer memory manager if(mm_obj.second.cross_mm != nullptr) { - mm_obj.second.cross_mm->finalize(); + mm_obj.second.cross_mm->populate(*mm_obj.second.allocator, num_pools); } } } |