SWDEV-515562 - Fix and enable hipDeviceReset tests (#594)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
8cc65f49c4
Коммит
e22856b3ac
@@ -9,8 +9,6 @@
|
||||
],
|
||||
"DisabledTests": [
|
||||
#if defined COMMON
|
||||
"Unit_hipDeviceReset_Positive_Basic",
|
||||
"Unit_hipDeviceReset_Positive_Threaded",
|
||||
"NOTE: The following test is disabled due to defect - EXSWHTEC-242",
|
||||
"Unit_hipFuncGetAttributes_Positive_Basic",
|
||||
"NOTE: The following test is disabled due to defect - EXSWHTEC-244",
|
||||
|
||||
@@ -84,8 +84,6 @@
|
||||
"Unit_hipDeviceGetPCIBusId_Negative_PartialFill",
|
||||
"Unit_hipDeviceGetSharedMemConfig_Positive_Basic",
|
||||
"Unit_hipDeviceGetSharedMemConfig_Positive_Threaded",
|
||||
"Unit_hipDeviceReset_Positive_Basic",
|
||||
"Unit_hipDeviceReset_Positive_Threaded",
|
||||
"Unit_hipInit_Negative",
|
||||
"Unit_hipGraphMemcpyNodeSetParams_Functional",
|
||||
"Unit_hipGraphNodeGetDependentNodes_Functional",
|
||||
|
||||
@@ -214,7 +214,5 @@
|
||||
"Unit_hipDeviceSetLimit_Negative_MallocHeapSize",
|
||||
"=== Disabling tests which no longer behave the same on nvidia platform ===",
|
||||
"Unit_hipGraphInstantiateWithParams_Negative",
|
||||
"Unit_hipDeviceReset_Positive_Basic",
|
||||
"Unit_hipDeviceReset_Positive_Threaded",
|
||||
]
|
||||
}
|
||||
|
||||
@@ -49,7 +49,9 @@ THE SOFTWARE.
|
||||
TEST_CASE("Unit_hipDeviceReset_Positive_Basic") {
|
||||
const auto device = GENERATE(range(0, HipTest::getDeviceCount()));
|
||||
HIP_CHECK(hipSetDevice(device));
|
||||
|
||||
INFO("Current device is: " << device);
|
||||
HIP_CHECK(hipDeviceReset());
|
||||
|
||||
unsigned int flags_before = 0u;
|
||||
HIP_CHECK(hipGetDeviceFlags(&flags_before));
|
||||
@@ -58,8 +60,6 @@ TEST_CASE("Unit_hipDeviceReset_Positive_Basic") {
|
||||
|
||||
void* ptr = nullptr;
|
||||
HIP_CHECK(hipMalloc(&ptr, 500));
|
||||
hipStream_t stream = nullptr;
|
||||
HIP_CHECK(hipStreamCreate(&stream));
|
||||
|
||||
const auto cache_config_ret = hipDeviceSetCacheConfig(hipFuncCachePreferL1);
|
||||
REQUIRE((cache_config_ret == hipSuccess || cache_config_ret == hipErrorNotSupported));
|
||||
@@ -79,12 +79,6 @@ TEST_CASE("Unit_hipDeviceReset_Positive_Basic") {
|
||||
|
||||
CHECK(hipFree(ptr) == hipErrorInvalidValue);
|
||||
|
||||
// Inconsistent behavior in CUDA, sometimes segfaults, sometimes works
|
||||
// Return value mismatch on AMD - EXSWHTEC-124
|
||||
#if 0
|
||||
CHECK(hipStreamDestroy(stream) == hipErrorInvalidHandle);
|
||||
#endif
|
||||
|
||||
if (cache_config_ret == hipSuccess) {
|
||||
hipFuncCache_t cache_config;
|
||||
CHECK(hipDeviceGetCacheConfig(&cache_config) == hipSuccess);
|
||||
@@ -114,6 +108,7 @@ TEST_CASE("Unit_hipDeviceReset_Positive_Basic") {
|
||||
TEST_CASE("Unit_hipDeviceReset_Positive_Threaded") {
|
||||
HIP_CHECK(hipSetDevice(0));
|
||||
INFO("Current device is: " << 0);
|
||||
HIP_CHECK(hipDeviceReset());
|
||||
|
||||
unsigned int flags_before = 0u;
|
||||
HIP_CHECK(hipGetDeviceFlags(&flags_before));
|
||||
@@ -122,8 +117,6 @@ TEST_CASE("Unit_hipDeviceReset_Positive_Threaded") {
|
||||
|
||||
void* ptr = nullptr;
|
||||
HIP_CHECK(hipMalloc(&ptr, 500));
|
||||
hipStream_t stream = nullptr;
|
||||
HIP_CHECK(hipStreamCreate(&stream));
|
||||
|
||||
const auto cache_config_ret = hipDeviceSetCacheConfig(hipFuncCachePreferL1);
|
||||
REQUIRE((cache_config_ret == hipSuccess || cache_config_ret == hipErrorNotSupported));
|
||||
@@ -148,12 +141,6 @@ TEST_CASE("Unit_hipDeviceReset_Positive_Threaded") {
|
||||
|
||||
CHECK(hipFree(ptr) == hipErrorInvalidValue);
|
||||
|
||||
// Inconsistent behavior in CUDA, sometimes segfaults, sometimes works
|
||||
// Return value mismatch on AMD - EXSWHTEC-124
|
||||
#if 0
|
||||
CHECK(hipStreamDestroy(stream) == hipErrorInvalidHandle);
|
||||
#endif
|
||||
|
||||
if (cache_config_ret == hipSuccess) {
|
||||
hipFuncCache_t cache_config;
|
||||
CHECK(hipDeviceGetCacheConfig(&cache_config) == hipSuccess);
|
||||
|
||||
Ссылка в новой задаче
Block a user