error return for int8 if gcnArch != 906
@@ -138,13 +138,19 @@ class SolutionWriter:
# NOTE: host compiler aligns size of structs to 64-bits (at least) and aligns the offset of pointers to 64-bits, therefore, having pointers which are not at the beginning of the struct may get padded/shifted by the host compiler and, therefore, not coppied correctly to gpu
- # kernels
- s += "\n%s/* kernels */\n" % (t)
- s += "%sconst unsigned int numKernels = %u; // 1 or 4\n" % (t, len(kernels))
-
if globalParameters["RuntimeLanguage"] == "HIP":
s += "%sint deviceId;\n" % (t)
s += "%shipGetDevice(&deviceId);\n" % (t)
+ if solution["ProblemType"]["DataType"].isInt8x4() and solution["ProblemType"]["HighPrecisionAccumulate"]:
+ if globalParameters["RuntimeLanguage"] == "HIP":
+ s += "%shipDeviceProp_t deviceProperties;\n" % (t)
+ s += "%shipGetDeviceProperties(&deviceProperties, deviceId);\n" % (t)
+ s += "%sint gcnArch = deviceProperties.gcnArch;\n" % (t)
+ s += "%sif(gcnArch != 906)return tensileStatusFailure;\n" % (t)
+
+ # kernels
+ s += "\n%s/* kernels */\n" % (t)
+ s += "%sconst unsigned int numKernels = %u; // 1 or 4\n" % (t, len(kernels))
if solution["KernelLanguage"] == "Source" and globalParameters["RuntimeLanguage"] == "OCL":
s += "%sconst char *kernelSources[numKernels] = {\n" % (t)
