From 9c67d3883adaa8a65e3567579cf99937deaab21a Mon Sep 17 00:00:00 2001 From: Giorgio Arena Date: Fri, 20 Aug 2021 15:24:03 +0100 Subject: Remove map/unmap overhead for input/output accessor when using DummyAccessor Don't map/unmap when the tensor data is not accessed in the input or output accessor. This is so to avoid measuring CPU overhead when benchmarking on the GPU backend. Resolve COMPMID-4712 Change-Id: I5baba1b93e7a51fe13525bcce6c0cfdecb14493e Signed-off-by: Giorgio Arena Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/6140 Comments-Addressed: Arm Jenkins Reviewed-by: Georgios Pinitas Tested-by: Arm Jenkins --- arm_compute/graph/backends/CL/CLDeviceBackend.h | 3 ++- arm_compute/graph/backends/NEON/NEDeviceBackend.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'arm_compute/graph/backends') diff --git a/arm_compute/graph/backends/CL/CLDeviceBackend.h b/arm_compute/graph/backends/CL/CLDeviceBackend.h index 278a8e5031..63674ad794 100644 --- a/arm_compute/graph/backends/CL/CLDeviceBackend.h +++ b/arm_compute/graph/backends/CL/CLDeviceBackend.h @@ -28,8 +28,8 @@ #include "arm_compute/runtime/CL/CLBufferAllocator.h" #include "arm_compute/runtime/CL/CLGEMMHeuristicsHandle.h" -#include "arm_compute/runtime/CL/CLTypes.h" #include "arm_compute/runtime/CL/CLTuner.h" +#include "arm_compute/runtime/CL/CLTypes.h" namespace arm_compute { @@ -70,6 +70,7 @@ public: Status validate_node(INode &node) override; std::shared_ptr create_memory_manager(MemoryManagerAffinity affinity) override; std::shared_ptr create_weights_manager() override; + void sync() override; private: int _context_count; /**< Counts how many contexts are currently using the backend */ diff --git a/arm_compute/graph/backends/NEON/NEDeviceBackend.h b/arm_compute/graph/backends/NEON/NEDeviceBackend.h index 0b343c0d67..9cb37d4553 100644 --- a/arm_compute/graph/backends/NEON/NEDeviceBackend.h +++ b/arm_compute/graph/backends/NEON/NEDeviceBackend.h @@ -52,6 +52,7 @@ public: Status validate_node(INode &node) override; std::shared_ptr create_memory_manager(MemoryManagerAffinity affinity) override; std::shared_ptr create_weights_manager() override; + void sync() override; private: Allocator _allocator; /**< Backend allocator */ -- cgit v1.2.1