From 4fa3fb87c78628105559cc934bd3d5add852523f Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Tue, 8 Apr 2025 13:09:21 +0200 Subject: [PATCH] aco/insert_NOPs: allow WMMA with constant C matrix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Daniel Schürmann Part-of: --- src/amd/compiler/aco_insert_NOPs.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/amd/compiler/aco_insert_NOPs.cpp b/src/amd/compiler/aco_insert_NOPs.cpp index 96a57945190..831369649e1 100644 --- a/src/amd/compiler/aco_insert_NOPs.cpp +++ b/src/amd/compiler/aco_insert_NOPs.cpp @@ -1688,7 +1688,8 @@ handle_instruction_gfx11(State& state, NOP_ctx_gfx11& ctx, aco_ptr& /* WMMA Hazards */ if (instr_info.classes[(int)instr->opcode] == instr_class::wmma) { - assert(instr->operands.back().regClass() == instr->definitions[0].regClass()); + assert(instr->operands.back().isConstant() || + instr->operands.back().regClass() == instr->definitions[0].regClass()); bool is_swmma = instr->operands.size() == 4; if (test_vgpr_bitset(ctx.vgpr_written_by_wmma, instr->operands[0]) ||