Issue 244173
Summary [AMDGPU][Scheduler] Model hardware issue interlocks in the machine scheduler
Labels enhancement
Assignees keshavvinayak01
Reporter keshavvinayak01
    Some `AMDGPU` instructions are held up by hardware issue interlocks, even if they don’t share a register dependency. So changing the latency on existing dependency edges isn’t enough. The hardware already enforces these interlocks for correctness; the goal is to help the scheduler avoid or hide the stalls, not to insert waits or NOPs.           
                                                                                                                                              
For example, on `gfx942`, a `v_cmp` writing an SGPR pair or VCC followed by an unrelated `s_add` showed a 20-clock issue-to-issue gap. A VALU instruction writing only a VGPR, followed by s_add showed a 4-clock gap. Moving independent vector instructions between the compare and the add hid the extra 16 clocks in a microbenchmark.

This issue tracks modeling these interlocks across AMDGPU subtargets, including VALU writes to scalar state that delay scalar issue or other  affected instructions, and SALU completion interlocks that delay certain memory or branch instructions. The affected instructions and timings varies between generation, and I intend to use the `SchedModel` tablegens to track this interlock.

I will add the verified hardware numbers and other details here, so the resolving PR(s) can be less verbose.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to