Allow independent disables for LocalReadA, LocalReadB
@@ -245,7 +245,8 @@ class KernelWriterAssembly(KernelWriter):
self.do["GlobalReadB"] = True
self.do["GlobalInc"] = True
self.do["LocalWrite"] = True
- self.do["LocalRead"] = True
+ self.do["LocalReadA"] = True
+ self.do["LocalReadB"] = True
self.do["Wait"] = True
self.do["Sync"] = True
self.do["MAC"] = True
@@ -3283,7 +3284,8 @@ class KernelWriterAssembly(KernelWriter):
# Local Read: Swap Offsets A/B
##############################################################################
def localReadSwapOffsets(self, kernel, tP):
- if not self.do["LocalRead"]: return ""
+ tc=tP["tensorChar"]
+ if not self.do["LocalRead%s"%tc]: return ""
kStr = ""
#jgolds which bpe here? assuming tP
kStr += inst("v_xor_b32", \
@@ -3298,7 +3300,8 @@ class KernelWriterAssembly(KernelWriter):
# x % n == n & (n-1) for n power of 2
##############################################################################
def localReadResetOffsets(self, kernel, tP):
- if not self.do["LocalRead"]: return ""
+ tc=tP["tensorChar"]
+ if not self.do["LocalRead%s"%tc]: return ""
kStr = ""
if tP["localReadInstruction"].numOffsets == 1:
tP["localReadOffset"] = 0
@@ -3316,7 +3319,8 @@ class KernelWriterAssembly(KernelWriter):
# Local Read: Init Pointers A/B
##############################################################################
def localReadInitPointers(self, kernel, tP):
- if not self.do["LocalRead"]: return ""
+ tc=tP["tensorChar"]
+ if not self.do["LocalRead%s"%tc]: return ""
kStr = ""
if self.localReadInstructionA.numOffsets == 1:
tP["localReadOffset"] = 0
@@ -3335,7 +3339,8 @@ class KernelWriterAssembly(KernelWriter):
# Local Read: Increment A/B
##############################################################################
def localReadInc(self, kernel, tP):
- if not self.do["LocalRead"]: return ""
+ tc=tP["tensorChar"]
+ if not self.do["LocalRead%s"%tc]: return ""
kStr = ""
tc = tP["tensorChar"]
if self.inTailLoop:
@@ -3367,10 +3372,10 @@ class KernelWriterAssembly(KernelWriter):
# Local Read: Do It A/B
##############################################################################
def localReadDo(self, kernel, black, tP):
- if not self.do["LocalRead"]: return ""
+ tc=tP["tensorChar"]
+ if not self.do["LocalRead%s"%tc]: return ""
self.localReadDoCnt += 1
kStr = ""
- tc = tP["tensorChar"]
#kStr += dump(vgpr("Valu%s%s+%u"%("Blk" if black else "", tP["tensorChar"], 0)))
instruction = tP["localReadInstruction"]
numOffsets = instruction.numOffsets
