Only allocate coutRowPtr when not LdcEqualsLdd
@@ -6748,6 +6748,7 @@ class KernelWriterAssembly(KernelWriter):
if kernel["BufferStore"]:
self.cinRowPtr = self.vgprPool.checkOut(1, "cinRowPtr")
+ if not kernel["LdcEqualsLdd"]:
self.coutRowPtr = self.vgprPool.checkOut(1, "coutRowPtr")
tmpV0 = self.vgprPool.checkOut(2)
@@ -6770,12 +6771,13 @@ class KernelWriterAssembly(KernelWriter):
#--
assert (len(kernel["PackedC1IndicesX"]) == 1) # would need to extract/scale indices from coord1
startStride = 1 if kernel["ProblemType"]["UseInitialStrides"] else 0
- kStr += inst("v_mul_lo_u32", vgpr(self.coutRowPtr),
- vgpr(tid1), sgpr("StridesD+%u"%(startStride)), \
- "rowStart vgpr")
kStr += inst("v_mul_lo_u32", vgpr(self.cinRowPtr),
vgpr(tid1), sgpr("StridesC+%u"%(startStride)), \
"rowStart vgpr")
+ if not kernel["LdcEqualsLdd"]:
+ kStr += inst("v_mul_lo_u32", vgpr(self.coutRowPtr),
+ vgpr(tid1), sgpr("StridesD+%u"%(startStride)), \
+ "rowStart vgpr")
kStr += "\n"
#kStr += self.assert_ne(sgpr("WorkGroup1"),1)
@@ -6925,6 +6927,7 @@ class KernelWriterAssembly(KernelWriter):
if kernel["BufferStore"]:
self.vgprPool.checkIn(self.cinRowPtr)
+ if not kernel["LdcEqualsLdd"]:
self.vgprPool.checkIn(self.coutRowPtr)
if not kernel["BufferStore"]:
self.vgprPool.checkIn(self.addrD)
