Properly order signal copy agent tagging with copy operation.

Change-Id: Ic428c958551279fbea1b2449afba930b82804ede
This commit is contained in:
Sean Keely
2017-07-11 00:52:28 -05:00
parent c9f0427cb0
commit 3e50adc7ce
@@ -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;
}