From ed260ea970aa1d25c9a7ee3fbe9a8953705b3c8b Mon Sep 17 00:00:00 2001 From: Jonathan Kim Date: Tue, 27 Feb 2024 12:37:17 -0500 Subject: [PATCH] Fix gang item wait on dependency signals Gang items have to wait on dependency signals as well as the leader. Copies should not start if shaders are still operating on memory to be copied. Change-Id: I99703b420045ebcba2c9da39ec64678129dc140f --- runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp b/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp index 2f44353c47..d7f6a4fdb7 100644 --- a/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp +++ b/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp @@ -963,10 +963,9 @@ hsa_status_t GpuAgent::DmaCopy(void* dst, core::Agent& dst_agent, hsa_status_t stat; size_t chunk = std::min(remainder_size, (size + gang_factor - 1)/gang_factor); if (!blit->GangLeader() && !gang_signals.empty()) { - std::vector dep_signals_null(0); // only leader has to wait on dependencies stat = blit->SubmitLinearCopyCommand(reinterpret_cast(dst) + offset, reinterpret_cast(src) + offset, - chunk, dep_signals_null, + chunk, dep_signals, *gang_signals[gang_sig_count], gang_signals); gang_sig_count++; } else {