aco: insert VALU s_delay_alu for WMMA

This should avoid some SIMD stalls.

I think this special case was added to try to handle this case:

First Instruction: WMMA
Second Instruction: WMMA instruction with same VGPR of previous WMMA instruction’s Matrix D as Matrix C
Stall if the first and second instruction are not the same type of WMMA or use ABS/NEG on SRC2 of the second instruction

If I read it correctly, we shouldn't need a delay if the type is the same and no
modifier is used. That's kind of complex to handle, so leave it for now.
Not inserting any delays likely hurts more than this.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36328>
This commit is contained in:
Georg Lehmann 2025-07-23 19:04:27 +02:00 committed by Marge Bot
parent 413d0d2ec8
commit ad9c340d86

View file

@ -256,8 +256,7 @@ gen_alu(Instruction* instr, delay_ctx& ctx)
}
}
update_alu(ctx, is_valu && instr_info.classes[(int)instr->opcode] != instr_class::wmma, is_trans,
cycle_info.issue_cycles);
update_alu(ctx, is_valu, is_trans, cycle_info.issue_cycles);
}
void