SWDEV-369042 - updating to GetError to match cuda

Change-Id: I0ec2330443b26cb1c8cedba942f31fb1267cd09d


[ROCm/clr commit: 335a24d1a0]
This commit is contained in:
pghafari authored and Payam Ghafari committed 2023-01-06 05:33:41 -05:00
1 parent f91da83d6a
commit bb765cafaf
2 files changed
+14 -4

No files matched your search

+2 -2
View File
@@ -357,7 +357,7 @@ hipError_t hipDrvGetErrorName(hipError_t hip_error, const char** errStr)
return hipErrorInvalidValue;
}
*errStr = ihipGetErrorName(hip_error);
if (strcmp( *errStr, "hipErrorUnknown") != 0) {
if (hip_error == hipErrorUnknown || strcmp( *errStr, "hipErrorUnknown") != 0) {
return hipSuccess;
} else {
return hipErrorInvalidValue;
@@ -370,7 +370,7 @@ hipError_t hipDrvGetErrorString(hipError_t hip_error, const char** errStr)
return hipErrorInvalidValue;
}
*errStr = ihipGetErrorString(hip_error);
if (strcmp( *errStr, "unknown error") != 0) {
if (hip_error == hipErrorUnknown || strcmp( *errStr, "unknown error") != 0) {
return hipSuccess;
} else {
return hipErrorInvalidValue;