From 3e50adc7ce2eda99b7ee906ab0e3bd15b6fef65a Mon Sep 17 00:00:00 2001 From: Sean Keely Date: Tue, 11 Jul 2017 00:52:28 -0500 Subject: [PATCH] Properly order signal copy agent tagging with copy operation. Change-Id: Ic428c958551279fbea1b2449afba930b82804ede --- runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp b/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp index 1fa48a94da..3134e87d11 100644 --- a/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp +++ b/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp @@ -643,15 +643,14 @@ hsa_status_t GpuAgent::DmaCopy(void* dst, core::Agent& dst_agent, return HSA_STATUS_ERROR_OUT_OF_RESOURCES; } - hsa_status_t stat = - blit->SubmitLinearCopyCommand(dst, src, size, dep_signals, out_signal); - - if (profiling_enabled() && HSA_STATUS_SUCCESS == stat) { + if (profiling_enabled()) { // Track the agent so we could translate the resulting timestamp to system // domain correctly. out_signal.async_copy_agent(this); } + hsa_status_t stat = blit->SubmitLinearCopyCommand(dst, src, size, dep_signals, out_signal); + return stat; }