SIGN IN SIGN UP

[hipGraph] Add graph signal pool and

=?UTF-8?q?=20remove=20pre/post=20markers=20for=20non-=E2=80=A6=20(#5333)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

…captured nodes

1. Remove pre/post marker enqueue for non-captured nodes in
EnqueueSegment. In direct dispatch mode, in-order HW queue execution
guarantees ordering with surrounding flat-dispatched batches. Engine
transitions (SDMA) are handled by releaseGpuMemoryFence and
WaitingSignal engine tracking.

2. Add per-launch GraphSignalPool so ActiveSignal() draws from
graph-owned signals instead of the runtime's rotating signal_list_. This
eliminates WaitCurrent/WaitNext CPU stalls and per-launch signal
allocation overhead.

- Two sub-pools: GPU-only (fast) and interrupt-capable (host callbacks)
   - Pool pointer carried on each amd::Command for thread safety
- SyncPlan HW events also allocated from the pool (replaces
CreateHwEvents)
   - AccumulateCommand owns the pool; cleanup after GPU completion
- First launch grows on demand, caches count for pre-allocation on
subsequent launches
- IRQ signal count determined at instantiation from graph topology (host
nodes)
- HwQueueTracker methods (WaitingSignal, WaitCurrent, WaitNext,
GetLastSignal, ResetCurrentSignal) use last_graph_signal_ to track graph
pool state

## Motivation

<!-- Explain the purpose of this PR and the goals it aims to achieve.
-->

## Technical Details

<!-- Explain the changes along with any relevant GitHub links. -->

## JIRA ID

<!-- If applicable, mention the JIRA ID resolved by this PR (Example:
Resolves SWDEV-12345). -->
<!-- Do not post any JIRA links here. -->

## Test Plan

<!-- Explain any relevant testing done to verify this PR. -->

## Test Result

<!-- Briefly summarize test outcomes. -->

## Submission Checklist

- [ ] Look over the contributing guidelines at
https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.
[rocm-systems] ROCm/rocm-systems#5333 (commit f17b057)
G
Godavarthy Surya, Anusha committed
751ad901b8ea640109556da0cf4cdae1cb0250b9
Parent: c7010c3
Committed by systems-assistant[bot] <systems-assistant[bot]@users.noreply.github.com> on 5/8/2026, 11:14:48 AM