correction for hgemm alpha, beta
@@ -2076,9 +2076,19 @@ class KernelWriterAssembly(KernelWriter):
kStr += self.v2Argument( 'A', '8', '8', "GlobalBuffer", srcValueType, "Generic"); ka_size += 8
kStr += self.v2Argument( 'B', '8', '8', "GlobalBuffer", srcValueType, "Generic"); ka_size += 8
+ if kernel["ProblemType"]["DataType"].isHalf() or \
+ kernel["ProblemType"]["DataType"].isSingle() or \
+ kernel["ProblemType"]["DataType"].isInt8x4():
+ kStr += self.v2Argument( "alpha", '4', '4', "ByValue", cptValueType); ka_size += 4
+ elif kernel["ProblemType"]["DataType"].isDouble():
kStr += self.v2Argument( "alpha", cptSize, cptAlign, "ByValue", cptValueType); ka_size += cptByte
if kernel["ProblemType"]["UseBeta"]:
+ if kernel["ProblemType"]["DataType"].isHalf() or \
+ kernel["ProblemType"]["DataType"].isSingle() or \
+ kernel["ProblemType"]["DataType"].isInt8x4():
+ kStr += self.v2Argument( "beta", '4', '4', "ByValue", cptValueType); ka_size += 4
+ elif kernel["ProblemType"]["DataType"].isDouble():
kStr += self.v2Argument( "beta", cptSize, cptAlign, "ByValue", cptValueType); ka_size += cptByte
for i in range(0, self.numSgprStridesD):
@@ -2164,9 +2174,19 @@ class KernelWriterAssembly(KernelWriter):
kStr += self.v3Argument( 'A', '8', offset, "global_buffer","struct", srcValueType); offset += 8
kStr += self.v3Argument( 'B', '8', offset, "global_buffer","struct", srcValueType); offset += 8
+ if kernel["ProblemType"]["DataType"].isHalf() or \
+ kernel["ProblemType"]["DataType"].isSingle() or \
+ kernel["ProblemType"]["DataType"].isInt8x4():
+ kStr += self.v3Argument( "alpha", 4, offset, "by_value", cptValueType); offset += 4
+ elif kernel["ProblemType"]["DataType"].isDouble():
kStr += self.v3Argument( "alpha", cptSize, offset, "by_value", cptValueType); offset += cptByte
if kernel["ProblemType"]["UseBeta"]:
+ if kernel["ProblemType"]["DataType"].isHalf() or \
+ kernel["ProblemType"]["DataType"].isSingle() or \
+ kernel["ProblemType"]["DataType"].isInt8x4():
+ kStr += self.v3Argument( "beta", 4, offset, "by_value", cptValueType); offset += 4
+ elif kernel["ProblemType"]["DataType"].isDouble():
kStr += self.v3Argument( "beta", cptSize, offset, "by_value", cptValueType); offset += cptByte
for i in range(0, self.numSgprStridesD):
