From 8b0c88e49bd8024764eb83c13823aa42e6f5f7ce Mon Sep 17 00:00:00 2001 From: Branislav Brzak Date: Tue, 4 Jun 2024 03:13:51 -0700 Subject: [PATCH] SWDEV-465209 - Enable Not_Supported tests This addresses SWDEV-465209 SWDEV-465211 SWDEV-465216 SWDEV-465218 SWDEV-465210 Change-Id: I3596f058050d056608dbbe5353306ee88d277b44 [ROCm/hip-tests commit: 570c690f427556c672c7a3e17d5a04e2028688b5] --- .../catch/hipTestMain/config/config_amd_linux | 5 ----- .../catch/hipTestMain/config/config_amd_windows | 5 ----- .../catch/hipTestMain/config/config_amd_wsl.json | 12 ------------ .../hipTestMain/config/config_nvidia_linux.json | 4 ---- .../hipTestMain/config/config_nvidia_windows.json | 4 ---- .../catch/unit/executionControl/CMakeLists.txt | 10 +++++++--- .../unit/executionControl/hipFuncSetAttribute.cc | 10 ++++++++++ .../unit/executionControl/hipFuncSetCacheConfig.cc | 5 +++++ .../executionControl/hipFuncSetSharedMemConfig.cc | 5 +++++ 9 files changed, 27 insertions(+), 33 deletions(-) diff --git a/projects/hip-tests/catch/hipTestMain/config/config_amd_linux b/projects/hip-tests/catch/hipTestMain/config/config_amd_linux index c1583236de..883f0784ac 100644 --- a/projects/hip-tests/catch/hipTestMain/config/config_amd_linux +++ b/projects/hip-tests/catch/hipTestMain/config/config_amd_linux @@ -28,7 +28,6 @@ "Unit_hipFuncSetCacheConfig_Positive_Basic", "Unit_hipFuncSetCacheConfig_Negative_Parameters", "Unit_hipFuncSetSharedMemConfig_Positive_Basic", - "Unit_hipFuncSetSharedMemConfig_Negative_Parameters", "Unit_hipFuncSetAttribute_Positive_MaxDynamicSharedMemorySize", "Unit_hipFuncSetAttribute_Positive_PreferredSharedMemoryCarveout", "Unit_hipFuncSetAttribute_Positive_Parameters", @@ -219,10 +218,6 @@ "Unit_hipMemcpy3D_Positive_Synchronization_Behavior", "Unit_hipMemcpyParam2D_Positive_Synchronization_Behavior", "Unit_hipDrvMemcpy3D_Positive_Synchronization_Behavior", - "Unit_hipFuncSetCacheConfig_Negative_Not_Supported", - "Unit_hipFuncSetSharedMemConfig_Negative_Not_Supported", - "Unit_hipFuncSetAttribute_Positive_MaxDynamicSharedMemorySize_Not_Supported", - "Unit_hipFuncSetAttribute_Positive_PreferredSharedMemoryCarveout_Not_Supported", "Unit_hipLaunchCooperativeKernel_Negative_Parameters", "Unit_hipDeviceGetGraphMemAttribute_Positive_ReuseMemory", "Unit_hipDrvGraphAddMemsetNode_Negative_Parameters", diff --git a/projects/hip-tests/catch/hipTestMain/config/config_amd_windows b/projects/hip-tests/catch/hipTestMain/config/config_amd_windows index 25c3c2e89e..7f3a42f52b 100644 --- a/projects/hip-tests/catch/hipTestMain/config/config_amd_windows +++ b/projects/hip-tests/catch/hipTestMain/config/config_amd_windows @@ -109,7 +109,6 @@ "Unit_hipFuncSetCacheConfig_Positive_Basic", "Unit_hipFuncSetCacheConfig_Negative_Parameters", "Unit_hipFuncSetSharedMemConfig_Positive_Basic", - "Unit_hipFuncSetSharedMemConfig_Negative_Parameters", "Unit_hipFuncSetAttribute_Positive_MaxDynamicSharedMemorySize", "Unit_hipFuncSetAttribute_Positive_PreferredSharedMemoryCarveout", "Unit_hipFuncSetAttribute_Positive_Parameters", @@ -362,10 +361,6 @@ "Unit_hipMemcpyParam2D_Positive_Synchronization_Behavior", "Unit_hipDrvMemcpy3D_Positive_Synchronization_Behavior", "Unit_Thread_Block_Tile_Dynamic_Getters_Positive_Basic", - "Unit_hipFuncSetCacheConfig_Negative_Not_Supported", - "Unit_hipFuncSetSharedMemConfig_Negative_Not_Supported", - "Unit_hipFuncSetAttribute_Positive_MaxDynamicSharedMemorySize_Not_Supported", - "Unit_hipFuncSetAttribute_Positive_PreferredSharedMemoryCarveout_Not_Supported", "Performance_hipMemcpy2D_HostToHost", "Performance_hipMemcpy2DAsync_HostToHost", "Unit_hipDeviceGetGraphMemAttribute_Positive_ReuseMemory", diff --git a/projects/hip-tests/catch/hipTestMain/config/config_amd_wsl.json b/projects/hip-tests/catch/hipTestMain/config/config_amd_wsl.json index 3bb95cb63e..7dfa5f776a 100644 --- a/projects/hip-tests/catch/hipTestMain/config/config_amd_wsl.json +++ b/projects/hip-tests/catch/hipTestMain/config/config_amd_wsl.json @@ -95,7 +95,6 @@ "Unit_hipFuncSetCacheConfig_Positive_Basic", "Unit_hipFuncSetCacheConfig_Negative_Parameters", "Unit_hipFuncSetSharedMemConfig_Positive_Basic", - "Unit_hipFuncSetSharedMemConfig_Negative_Parameters", "Unit_hipFuncSetAttribute_Positive_MaxDynamicSharedMemorySize", "Unit_hipFuncSetAttribute_Positive_PreferredSharedMemoryCarveout", "Unit_hipFuncSetAttribute_Positive_Parameters", @@ -106,11 +105,6 @@ "Unit_hipEventCreateWithFlags_DefaultFlg_NonCohHstMem", "Unit_hipEventCreateWithFlags_DisableSystemFence_CohHstMem", "Unit_hipEventCreateWithFlags_DefaultFlg_CohHstMem", - "NOTE: The following 4 tests are disabled due to defect - EXSWHTEC-240", - "Unit_hipFuncSetCacheConfig_Negative_Not_Supported", - "Unit_hipFuncSetSharedMemConfig_Negative_Not_Supported", - "Unit_hipFuncSetAttribute_Positive_MaxDynamicSharedMemorySize_Not_Supported", - "Unit_hipFuncSetAttribute_Positive_PreferredSharedMemoryCarveout_Not_Supported", "Unit_hipOccupancyMaxActiveBlocksPerMultiprocessor_Negative_Parameters", "Unit_hipModuleOccupancyMaxActiveBlocksPerMultiprocessorWithFlags_Negative_Parameters", "Unit_hipModuleOccupancyMaxPotentialBlockSizeWithFlags_Negative_Parameters", @@ -383,16 +377,10 @@ "Unit_hipFuncSetCacheConfig_Positive_Basic", "Unit_hipFuncSetCacheConfig_Negative_Parameters", "Unit_hipFuncSetSharedMemConfig_Positive_Basic", - "Unit_hipFuncSetSharedMemConfig_Negative_Parameters", "Unit_hipFuncSetAttribute_Positive_MaxDynamicSharedMemorySize", "Unit_hipFuncSetAttribute_Positive_PreferredSharedMemoryCarveout", "Unit_hipFuncSetAttribute_Positive_Parameters", "Unit_hipFuncSetAttribute_Negative_Parameters", - "NOTE: The following 4 tests are disabled due to defect - EXSWHTEC-240", - "Unit_hipFuncSetCacheConfig_Negative_Not_Supported", - "Unit_hipFuncSetSharedMemConfig_Negative_Not_Supported", - "Unit_hipFuncSetAttribute_Positive_MaxDynamicSharedMemorySize_Not_Supported", - "Unit_hipFuncSetAttribute_Positive_PreferredSharedMemoryCarveout_Not_Supported", "Unit_hipOccupancyMaxActiveBlocksPerMultiprocessor_Negative_Parameters", "Unit_hipModuleOccupancyMaxActiveBlocksPerMultiprocessorWithFlags_Negative_Parameters", "Unit_hipModuleOccupancyMaxPotentialBlockSizeWithFlags_Negative_Parameters", 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 bfa2703e7c..5ee2cfb1c7 100644 --- a/projects/hip-tests/catch/hipTestMain/config/config_nvidia_linux.json +++ b/projects/hip-tests/catch/hipTestMain/config/config_nvidia_linux.json @@ -1,9 +1,5 @@ { "DisabledTests": [ - "Unit_hipFuncSetCacheConfig_Negative_Not_Supported", - "Unit_hipFuncSetSharedMemConfig_Negative_Not_Supported", - "Unit_hipFuncSetAttribute_Positive_MaxDynamicSharedMemorySize_Not_Supported", - "Unit_hipFuncSetAttribute_Positive_PreferredSharedMemoryCarveout_Not_Supported", "=== Below test fails in external CI for PR https://github.com/ROCm-Developer-Tools/hip-tests/pull/85 ===", "Unit_hipFuncSetAttribute_Negative_Parameters", "=== Below test fails in external CI for PR https://github.com/ROCm-Developer-Tools/hip-tests/pull/215 ===", diff --git a/projects/hip-tests/catch/hipTestMain/config/config_nvidia_windows.json b/projects/hip-tests/catch/hipTestMain/config/config_nvidia_windows.json index aee14e3a6d..48d727bf05 100644 --- a/projects/hip-tests/catch/hipTestMain/config/config_nvidia_windows.json +++ b/projects/hip-tests/catch/hipTestMain/config/config_nvidia_windows.json @@ -1,9 +1,5 @@ { "DisabledTests": [ - "Unit_hipFuncSetCacheConfig_Negative_Not_Supported", - "Unit_hipFuncSetSharedMemConfig_Negative_Not_Supported", - "Unit_hipFuncSetAttribute_Positive_MaxDynamicSharedMemorySize_Not_Supported", - "Unit_hipFuncSetAttribute_Positive_PreferredSharedMemoryCarveout_Not_Supported", "=== Below test fails in external CI for PR https://github.com/ROCm-Developer-Tools/hip-tests/pull/215 ===", "Unit_ChannelDescriptor_Positive_Basic_1D - long", "Unit_ChannelDescriptor_Positive_Basic_1D - unsigned long", diff --git a/projects/hip-tests/catch/unit/executionControl/CMakeLists.txt b/projects/hip-tests/catch/unit/executionControl/CMakeLists.txt index 877addd79b..16647b8c51 100644 --- a/projects/hip-tests/catch/unit/executionControl/CMakeLists.txt +++ b/projects/hip-tests/catch/unit/executionControl/CMakeLists.txt @@ -1,8 +1,5 @@ set(TEST_SRC execution_control_common.cc - hipFuncSetCacheConfig.cc - hipFuncSetSharedMemConfig.cc - hipFuncSetAttribute.cc hipFuncGetAttributes.cc hipLaunchKernel.cc hipLaunchCooperativeKernel.cc @@ -15,6 +12,13 @@ if(HIP_PLATFORM MATCHES "amd") hipExtLaunchMultiKernelMultiDevice.cc launch_api.cc ) +else() + # These functions are currently unimplemented on AMD + set(TEST_SRC ${TEST_SRC} + hipFuncSetCacheConfig.cc + hipFuncSetSharedMemConfig.cc + hipFuncSetAttribute.cc + ) endif() hip_add_exe_to_target(NAME ExecutionControlTest diff --git a/projects/hip-tests/catch/unit/executionControl/hipFuncSetAttribute.cc b/projects/hip-tests/catch/unit/executionControl/hipFuncSetAttribute.cc index 177598d755..5cf4313709 100644 --- a/projects/hip-tests/catch/unit/executionControl/hipFuncSetAttribute.cc +++ b/projects/hip-tests/catch/unit/executionControl/hipFuncSetAttribute.cc @@ -219,6 +219,11 @@ TEST_CASE("Unit_hipFuncSetAttribute_Negative_Parameters") { * - HIP_VERSION >= 5.2 */ TEST_CASE("Unit_hipFuncSetAttribute_Positive_MaxDynamicSharedMemorySize_Not_Supported") { +#if HT_NVIDIA + HipTest::HIP_SKIP_TEST("This is an AMD specific test"); + return; +#endif + hipFuncAttributes old_attributes; HIP_CHECK(hipFuncGetAttributes(&old_attributes, reinterpret_cast(kernel))); @@ -246,6 +251,11 @@ TEST_CASE("Unit_hipFuncSetAttribute_Positive_MaxDynamicSharedMemorySize_Not_Supp * - HIP_VERSION >= 5.2 */ TEST_CASE("Unit_hipFuncSetAttribute_Positive_PreferredSharedMemoryCarveout_Not_Supported") { +#if HT_NVIDIA + HipTest::HIP_SKIP_TEST("This is an AMD specific test"); + return; +#endif + hipFuncAttributes old_attributes; HIP_CHECK(hipFuncGetAttributes(&old_attributes, reinterpret_cast(kernel))); diff --git a/projects/hip-tests/catch/unit/executionControl/hipFuncSetCacheConfig.cc b/projects/hip-tests/catch/unit/executionControl/hipFuncSetCacheConfig.cc index 600e8fdc0d..ca3a8e4d57 100644 --- a/projects/hip-tests/catch/unit/executionControl/hipFuncSetCacheConfig.cc +++ b/projects/hip-tests/catch/unit/executionControl/hipFuncSetCacheConfig.cc @@ -100,6 +100,11 @@ TEST_CASE("Unit_hipFuncSetCacheConfig_Negative_Parameters") { * - HIP_VERSION >= 5.2 */ TEST_CASE("Unit_hipFuncSetCacheConfig_Negative_Not_Supported") { +#if HT_NVIDIA + HipTest::HIP_SKIP_TEST("This is an AMD specific test"); + return; +#endif + HIP_CHECK_ERROR(hipFuncSetCacheConfig(reinterpret_cast(kernel), hipFuncCachePreferNone), hipErrorNotSupported); } diff --git a/projects/hip-tests/catch/unit/executionControl/hipFuncSetSharedMemConfig.cc b/projects/hip-tests/catch/unit/executionControl/hipFuncSetSharedMemConfig.cc index 7b68180e07..5d199c6d0a 100644 --- a/projects/hip-tests/catch/unit/executionControl/hipFuncSetSharedMemConfig.cc +++ b/projects/hip-tests/catch/unit/executionControl/hipFuncSetSharedMemConfig.cc @@ -100,6 +100,11 @@ TEST_CASE("Unit_hipFuncSetSharedMemConfig_Negative_Parameters") { * - HIP_VERSION >= 5.2 */ TEST_CASE("Unit_hipFuncSetSharedMemConfig_Negative_Not_Supported") { +#if HT_NVIDIA + HipTest::HIP_SKIP_TEST("This is an AMD specific test"); + return; +#endif + HIP_CHECK_ERROR( hipFuncSetSharedMemConfig(reinterpret_cast(kernel), hipSharedMemBankSizeDefault), hipErrorNotSupported);