changes for hpa_hgemm source
@@ -462,6 +462,12 @@ class KernelWriterSource(KernelWriter):
# real data
if ((kernel["ThreadTileA"] % 2 == 0) and (kernel["ProblemType"]["DataType"].isHalf())):
+ if kernel["ProblemType"]["HighPrecisionAccumulate"]:
+ kStr += "#define TYPE_MAC(MULA0,MULB0,DST0,MULA1,MULB1,DST1) " + self.endLinePP
+ kStr += " DST0 = MAC(MULA0,MULB0,DST0);" + self.endLinePP
+ kStr += " DST1 = MAC(MULA1,MULB1,DST1);" + self.endLinePP
+ kStr += self.endLine
+ else:
kStr += "#define TYPE_MAC(MULA0,MULB0,DST0,MULA1,MULB1,DST1) " + self.endLinePP
kStr += " a_pk_fma[0] = MULA0; %s " % (self.endLinePP)
kStr += " a_pk_fma[1] = MULA1; %s " % (self.endLinePP)
@@ -1381,6 +1387,10 @@ class KernelWriterSource(KernelWriter):
# registers for valu C
kStr += self.endLine
kStr += " /* registers for MAC's */" + self.endLine
+ if kernel["ProblemType"]["HighPrecisionAccumulate"] and kernel["ProblemType"]["DataType"].isHalf():
+ kStr += " float rC[TT%s*TT%s];%s" \
+ % (self.tileChar0, self.tileChar1, self.endLine )
+ else:
kStr += " DATA_TYPE rC[TT%s*TT%s];%s" \
% (self.tileChar0, self.tileChar1, self.endLine )
for i in range(0, kernel["ThreadTile0"]*kernel["ThreadTile1"]):
