clr: Use graph segment scheduling to process HIP Graphs (#1372)

* clr: Use graph segment scheduling to process HIP Graphs

* Add a broader path to use capture packet capture for all topologies
* Refactor code
* Use DEBUG_HIP_GRAPH_SEGMENT_SCHEDULING to toggle new vs classic path,
  Enabled by default

* clr: Few fixes and improvements

* clr: Detect complex graphs to take classic path

* Use DEBUG_HIP_GRAPH_SEGMENT_SCHEDULING=2 to force segment scheduling
  path

* clr: Fix a cornercase stack corruption

* clr: Track commands of segments instead of snapshots

* clr: Fix Batch dispatch logic

* Track fence_dirty_ flag for command of other streams
* Dependency resolution markers can now accomodate dirty fence on cross
  streams

---------

Co-authored-by: Ioannis Assiouras <Ioannis.Assiouras@amd.com>
Co-authored-by: Godavarthy Surya, Anusha <agodavar@amd.com>
This commit is contained in:
SaleelK
2025-12-01 12:49:26 -08:00
committed by GitHub
parent a627c12501
commit c105dcd05b
11 changed files with 1563 additions and 507 deletions
+2 -2
View File
@@ -352,7 +352,7 @@ bool DmaBlitManager::copyBufferRect(device::Memory& srcMemory, device::Memory& d
}
}
// The hsa copy api would result in a dirty cache state
// The ROCR copy api guarantees coherency after the copy
gpu().setFenceDirty(false);
return true;
}
@@ -590,7 +590,7 @@ inline bool DmaBlitManager::rocrCopyBuffer(address dst, hsa_agent_t& dstAgent, c
if (status == HSA_STATUS_SUCCESS) {
gpu().addSystemScope();
// The hsa copy api would result in a dirty cache state
// The ROCR copy api guarantees coherency after the copy
gpu().setFenceDirty(false);
} else {
gpu().Barriers().ResetCurrentSignal();