Use correct refactored loopcounter for MFMA
@@ -5038,7 +5038,7 @@ class KernelWriterAssembly(KernelWriter):
if kernel["MatrixInstruction"]:
kStr += "/* calculate number of remaining loops in terms of how many matrix instructions */\n"
kStr += "//numIter%s = ((numIter%s + MatrixInst%s - 1) / MatrixInst%s)\n"%(self.unrollChar, self.unrollChar, self.unrollChar, self.unrollChar)
- kStr += inst("s_add_u32", sgpr(loopCounterName), sgpr(loopCounterName), kernel["MatrixInstK"]-1, "")
+ kStr += inst("s_add_u32", loopCounter, loopCounter, kernel["MatrixInstK"]-1, "")
kStr += scalarStaticDivideAndRemainder(loopCounterName, None, loopCounterName, kernel["MatrixInstK"], tmpSgpr+2, 0)
loopCounter = sgpr(loopCounterName)
