Some more dot2 fixes. Lots more passing now.
@@ -4275,7 +4275,8 @@ class KernelWriterAssembly(KernelWriter):
#print "2lscaOffset", lscaOffset
offsetElements = (lspaOffset + lscaOffset)
#print "offsetElements", offsetElements
- if not tP["tlu"] and ldl > 1:
+ if ldl > 1:
+ if not tP["tlu"]:
#jgolds HACK
#Need to clean this up. Does not follow usual paradigm, but works for cases we care about with dot2
rem = (localWriteCnt) % tP["glvw"]
@@ -4285,6 +4286,9 @@ class KernelWriterAssembly(KernelWriter):
# medium facor is quo * kernel[tP["lsp]] * ldl: This is a "horizontal" shift as we need to fill in data that was skipped
# large factor is (rem / ldl) * kernel["MacroTile%u"%tP["tensorIdx"]] * ldl: We have to skip to the appropriate chunk of K "pairs"
offsetBytes = (quo * kernel[tP["lsp"]] * ldl + (rem / ldl) * kernel["MacroTile%u"%tP["tensorIdx"]] * ldl + rem % ldl)*tP["bpe"]
+ else:
+ # what if lsp is less than 2?
+ offsetBytes = (perp * kernel[tP["lsc"]] * kernel[tP["lsp"]] + sPerp * ldl) * tP["bpe"]
else:
offsetBytes = offsetElements*tP["bpe"]
