From 9da19e9da660057785fb736aba5c61b1ae773f2f Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Thu, 11 Oct 2018 15:33:11 +0100 Subject: 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 Tested-by: bsgcomp --- examples/neon_cnn.cpp | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) (limited to 'examples') 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; } -- cgit v1.2.1