diff --git a/projects/hip-tests/catch/hipTestMain/config/config_amd_linux b/projects/hip-tests/catch/hipTestMain/config/config_amd_linux index 1ffc2aa6e0..96c01b060b 100644 --- a/projects/hip-tests/catch/hipTestMain/config/config_amd_linux +++ b/projects/hip-tests/catch/hipTestMain/config/config_amd_linux @@ -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", diff --git a/projects/hip-tests/catch/hipTestMain/config/config_amd_windows b/projects/hip-tests/catch/hipTestMain/config/config_amd_windows index 073024ffed..c1c83cbf46 100644 --- a/projects/hip-tests/catch/hipTestMain/config/config_amd_windows +++ b/projects/hip-tests/catch/hipTestMain/config/config_amd_windows @@ -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", diff --git a/projects/hip-tests/catch/hipTestMain/config/config_nvidia_linux.json b/projects/hip-tests/catch/hipTestMain/config/config_nvidia_linux.json index 18532f0765..724094c1a1 100644 --- a/projects/hip-tests/catch/hipTestMain/config/config_nvidia_linux.json +++ b/projects/hip-tests/catch/hipTestMain/config/config_nvidia_linux.json @@ -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", ] } diff --git a/projects/hip-tests/catch/unit/device/hipDeviceReset.cc b/projects/hip-tests/catch/unit/device/hipDeviceReset.cc index b27d2a749e..ccd0547372 100644 --- a/projects/hip-tests/catch/unit/device/hipDeviceReset.cc +++ b/projects/hip-tests/catch/unit/device/hipDeviceReset.cc @@ -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);