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.

[ROCm/clr commit: 9b045922a8]
This commit is contained in:
Kudchadker, Saleel
2025-08-06 20:34:42 -07:00
committed by GitHub
parent 9cbbee4d6e
commit 3a849c6962
8 changed files with 40 additions and 6 deletions
@@ -251,6 +251,9 @@ class HostQueue : public CommandQueue {
//! Get the submitted batch
Command* GetSubmissionBatch() const { return head_; }
//! Get the current batch size
size_t GetSubmissionBatchSize() const { return size_; }
//! Insert a command into the linked list of submitted commands
void FormSubmissionBatch(Command* command) {
// Insert the command to the linked list.