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/IDeviceBackend.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'arm_compute/graph/IDeviceBackend.h') diff --git a/arm_compute/graph/IDeviceBackend.h b/arm_compute/graph/IDeviceBackend.h index 3a0a7e634e..f84aac0ae0 100644 --- a/arm_compute/graph/IDeviceBackend.h +++ b/arm_compute/graph/IDeviceBackend.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 Arm Limited. + * Copyright (c) 2018-2019,2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -118,6 +118,8 @@ public: * @return Weights manager */ virtual std::shared_ptr create_weights_manager() = 0; + /** Synchronize kernels execution on the backend. On GPU, this results in a blocking call waiting for all kernels to be completed. */ + virtual void sync() = 0; }; } // namespace backends } // namespace graph -- cgit v1.2.1