SWDEV-465162 - Support ignored error

Modified
TestContext::finalizeResults()

Added
HIP_CHECK_IGNORED_RETURN()
HIP_CHECK_ERRORS()

to supported ignored error such as hipErrorNotSupported.

Enable all mipmap tests in catch2 memory folder for linux.
The issues in the following tickets should be fixed.
SWDEV-465162, SWDEV-465163, SWDEV-465165, SWDEV-465166,
SWDEV-465168, SWDEV-465171, SWDEV-465172

Change-Id: I1146d6184582a7111a5af25b52f9e12c6a160e49
This commit is contained in:
taosang2
2024-06-11 14:09:37 -04:00
committed by Rakesh Roy
parent bcd3665ea9
commit de9581efb6
5 changed files with 54 additions and 41 deletions
+31
View File
@@ -49,6 +49,23 @@ THE SOFTWARE.
} \
}
#define HIP_CHECK_IGNORED_RETURN(error, ignoredError) \
{ \
hipError_t localError = error; \
if ((localError == ignoredError)) { \
INFO("Skipped: " << hipGetErrorString(localError) << "\n Code: " << localError \
<< "\n Str: " << #error << "\n In File: " << __FILE__ \
<< "\n At line: " << __LINE__); \
return; \
} \
if ((localError != hipSuccess) && (localError != hipErrorPeerAccessAlreadyEnabled)) { \
INFO("Error: " << hipGetErrorString(localError) << "\n Code: " << localError \
<< "\n Str: " << #error << "\n In File: " << __FILE__ \
<< "\n At line: " << __LINE__); \
REQUIRE(false); \
} \
}
// Threaded HIP_CHECKs
#define HIP_CHECK_THREAD(error) \
{ \
@@ -90,6 +107,20 @@ THE SOFTWARE.
REQUIRE(localError == expectedError); \
}
// Check that an expression, errorExpr, evaluates to the expected error_t, expectedError or
// expectedError1.
#define HIP_CHECK_ERRORS(errorExpr, expectedError, expectedError1) \
{ \
hipError_t localError = errorExpr; \
INFO("Matching Errors: " \
<< "\n Expected Error: " << hipGetErrorString(expectedError) \
<< "\n Expected Code: " << expectedError << " or " << expectedError << '\n' \
<< " Actual Error: " << hipGetErrorString(localError) \
<< "\n Actual Code: " << localError << "\nStr: " << #errorExpr \
<< "\n In File: " << __FILE__ << "\n At line: " << __LINE__); \
REQUIRE((localError == expectedError || localError == expectedError1)); \
}
// Not thread-safe
#define HIPRTC_CHECK(error) \
{ \