SWDEV-538195 - Introduce threshold for handler submission (#723)

- When doing device/stream sync, we can submit a handler which may
  introduce some host side delays. Use DEBUG_CLR_BATCH_CPU_SYNC_SIZE to
  batch commands for host wait. Default for HIP is 8 commands.
- Investigation is underway in ROCr but need to address this for now in
  HIP runtime.
This commit is contained in:
Kudchadker, Saleel
2025-08-06 20:34:42 -07:00
committed by GitHub
parent cd46294b31
commit 9b045922a8
8 changed files with 40 additions and 6 deletions
+4
View File
@@ -358,6 +358,8 @@ bool DmaBlitManager::copyBufferRect(device::Memory& srcMemory, device::Memory& d
}
}
// The hsa copy api would result in a dirty cache state
gpu().setFenceDirty(false);
return true;
}
@@ -573,6 +575,8 @@ inline bool DmaBlitManager::rocrCopyBuffer(address dst, hsa_agent_t& dstAgent,
if (status == HSA_STATUS_SUCCESS) {
gpu().addSystemScope();
// The hsa copy api would result in a dirty cache state
gpu().setFenceDirty(false);
} else {
gpu().Barriers().ResetCurrentSignal();
LogPrintfError("HSA copy failed with code %d, falling to Blit copy", status);