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 /examples/neon_cnn.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 'examples/neon_cnn.cpp')
-rw-r--r-- | examples/neon_cnn.cpp | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/examples/neon_cnn.cpp b/examples/neon_cnn.cpp index 1df81256b9..6f26af7af4 100644 --- a/examples/neon_cnn.cpp +++ b/examples/neon_cnn.cpp @@ -205,28 +205,11 @@ public: /* -----------------------End: [Allocate tensors] */ - // Finalize layers memory manager + // Populate the layers manager. (Validity checks, memory allocations etc) + mm_layers->populate(allocator, 1 /* num_pools */); - // Set allocator that the memory manager will use - mm_layers->set_allocator(&allocator); - - // Number of pools that the manager will create. This specifies how many layers you want to run in parallel - mm_layers->set_num_pools(1); - - // Finalize the manager. (Validity checks, memory allocations etc) - mm_layers->finalize(); - - // Finalize transitions memory manager - - // Set allocator that the memory manager will use - mm_transitions->set_allocator(&allocator); - - // Number of pools that the manager will create. This specifies how many models we can run in parallel. - // Setting to 2 as we need one for the input and one for the output at any given time - mm_transitions->set_num_pools(2); - - // Finalize the manager. (Validity checks, memory allocations etc) - mm_transitions->finalize(); + // Populate the transitions manager. (Validity checks, memory allocations etc) + mm_transitions->populate(allocator, 2 /* num_pools */); return true; } |