From b84e25313e5dc7acbc03623e1e071e845047c111 Mon Sep 17 00:00:00 2001 From: Viet-Hoa Do Date: Tue, 13 Dec 2022 13:09:10 +0000 Subject: Add output operator for dynamic fusion * The output of the fused operator must be explicitly specified using GpuOutput operator. * Any temporary tensors used to connect the output of an operator to the input of another operator will be marked as no-alloc and won't be allocated as a tensor in the memory. Resolves: COMPMID-5771 Signed-off-by: Viet-Hoa Do Change-Id: I5ae8e800f8f737db23a055a92b01c4f1d78c3bb8 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/8794 Tested-by: Arm Jenkins Reviewed-by: SiCong Li Reviewed-by: Gian Marco Iodice Reviewed-by: Gunes Bayir Comments-Addressed: Arm Jenkins Benchmark: Arm Jenkins --- src/dynamic_fusion/runtime/gpu/cl/ClWorkloadRuntime.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/dynamic_fusion/runtime') diff --git a/src/dynamic_fusion/runtime/gpu/cl/ClWorkloadRuntime.cpp b/src/dynamic_fusion/runtime/gpu/cl/ClWorkloadRuntime.cpp index 36168d14f1..7e427fef72 100644 --- a/src/dynamic_fusion/runtime/gpu/cl/ClWorkloadRuntime.cpp +++ b/src/dynamic_fusion/runtime/gpu/cl/ClWorkloadRuntime.cpp @@ -132,10 +132,11 @@ Status create_aux_tensors(ClAuxTensors *aux_tensors, const GpuWorkloadSourceCode ARM_COMPUTE_ERROR_ON(tensor_info.id() != t_id); const auto aux_memory_info = workload_arg->memory_descriptor()->aux_memory_info; tensor_object = aux_tensors->add_aux_tensor(tensor_info, aux_memory_info); - } - if(tensor_object == nullptr) - { - return ARM_COMPUTE_CREATE_ERROR(ErrorCode::RUNTIME_ERROR, "Failed to construct an auxiliary tensor"); + + if(tensor_object == nullptr) + { + return ARM_COMPUTE_CREATE_ERROR(ErrorCode::RUNTIME_ERROR, "Failed to construct an auxiliary tensor"); + } } } return Status{}; -- cgit v1.2.1