From 38f67d4a0b4b90d223bb6855c312a58cd005148d Mon Sep 17 00:00:00 2001 From: Ioannis Assiouras Date: Sat, 1 Jun 2024 22:23:10 +0100 Subject: [PATCH] SWDEV-464648 - code and comment cleanups Change-Id: I10b462078fa9eed73372d81dff92d7278731f736 --- catch/hipTestMain/config/config_amd_linux | 32 ++++--------------- catch/hipTestMain/config/config_amd_windows | 6 ++-- catch/hipTestMain/config/config_amd_wsl.json | 2 +- catch/unit/atomics/CMakeLists.txt | 14 ++++---- catch/unit/deviceLib/fp8.cpp | 2 +- catch/unit/memory/CMakeLists.txt | 12 +++---- catch/unit/texture/CMakeLists.txt | 16 +++++----- samples/0_Intro/square/README.md | 2 +- .../2_Cookbook/0_MatrixTranspose/Readme.md | 2 +- samples/2_Cookbook/1_hipEvent/Readme.md | 2 +- samples/2_Cookbook/3_shared_memory/Readme.md | 2 +- samples/2_Cookbook/4_shfl/Readme.md | 2 +- samples/2_Cookbook/5_2dshfl/Readme.md | 2 +- samples/2_Cookbook/6_dynamic_shared/Readme.md | 2 +- 14 files changed, 39 insertions(+), 59 deletions(-) diff --git a/catch/hipTestMain/config/config_amd_linux b/catch/hipTestMain/config/config_amd_linux index 2d4079a23f..4752cf069f 100644 --- a/catch/hipTestMain/config/config_amd_linux +++ b/catch/hipTestMain/config/config_amd_linux @@ -1,25 +1,5 @@ #define COMMON -#if defined gfx906 - #define VEGA20 -#endif - -#if defined gfx908 - #define MI100 -#endif - -#if defined gfx90a || defined gfx940 || defined gfx941 || defined gfx942 - #define MI2XX -#endif - -#if defined gfx1030 - #define NAVI21 -#endif - -#if defined gfx1100 || defined gfx1102 - #define NAVI3X -#endif - { "Info": [ "File generated for commit on below mentioned date and time", @@ -1310,7 +1290,7 @@ "Unit_atomicCAS_system_Positive_Host_And_Peer_GPUs - int", "Unit_atomicCAS_system_Positive_Host_And_Peer_GPUs - unsigned int", "Unit_atomicCAS_system_Positive_Host_And_Peer_GPUs - unsigned long long", - "SWDEV-447384, SWDEV-447932: These tests fail in Navi31, Navi32 & Navi33", + "SWDEV-447384, SWDEV-447932: These tests fail in gfx1100, gfx1101 & gfx1102", "Unit_hipFreeAsync_Negative_Parameters", "Unit_hipMallocMipmappedArray_DiffSizes", "Unit_hipMallocMipmappedArray_MultiThread", @@ -1368,11 +1348,11 @@ "Unit_hipGraphAddMemAllocNode_Positive_FreeSeparateGraph", "Unit_hipGraphAddMemFreeNode_Negative_NotSupported", #endif - #if defined VEGA20 + #if defined gfx906 "=== SWDEV-419112 Below tests fail in stress test on 29/08/23 ===", "Unit_deviceAllocation_Malloc_ComplexDataType", #endif - #if defined MI100 + #if defined gfx908 "=== Below test soft hang in stress test on 29/08/23 ===", "Unit_hipMultiThreadStreams2", "=== SWDEV-425248:Below tests failed in stress test on 11/10/23 ===", @@ -1413,7 +1393,7 @@ "=== SWDEV-443630 - Below tests failed in stress test on 19/01/23 ===", "Unit_hipGetSetDevice_MultiThreaded", #endif - #if defined MI2XX + #if defined gfx90a || defined gfx940 || defined gfx941 || defined gfx942 "Unit_hipStreamPerThread_DeviceReset_1", "Unit_hipDeviceGetPCIBusId_Negative_PartialFill", "Unit_hipInit_Negative", @@ -1542,11 +1522,11 @@ "Unit_Warp_Vote_Any_Positive_Basic", "Unit_Warp_Vote_All_Positive_Basic", #endif - #if defined NAVI21 + #if defined gfx1030 "=== SWDEV-445961: These tests hang in PSDB stress test on 09/02/2024 ===", "Unit_hipStreamBeginCapture_hipStreamPerThread", #endif - #if defined NAVI3X + #if defined gfx1100 || defined gfx1102 "=== Below tests soft hang in stress test on 13/09/23 ===", "Unit_hipMemsetFunctional_ZeroValue_hipMemsetD16", "Unit_hipIpcMemAccess_Semaphores", diff --git a/catch/hipTestMain/config/config_amd_windows b/catch/hipTestMain/config/config_amd_windows index e79cba1db4..a0320e1ef2 100644 --- a/catch/hipTestMain/config/config_amd_windows +++ b/catch/hipTestMain/config/config_amd_windows @@ -330,16 +330,16 @@ "Unit_hipExtLaunchKernelGGL_Functional", "SWDEV-413997: VMM test still failing in windows", "Unit_hipMemSetAccess_ChangeAccessProp", - "SWDEV-444041: These tests fail randomly in Navi21 MGU", + "SWDEV-444041: These tests fail randomly in gfx1030 MGU", "Unit_hipMemMap_SameMemoryReuse", "Unit_hipMemMap_negative", "Unit_hipMemSetAccess_Vmm2PeerDevMemCpy", - "SWDEV-444041: These tests fail in Navi31 MGPU", + "SWDEV-444041: These tests fail in gfx1100 MGPU", "Unit_hipMemMap_PhysicalMemoryReuse_SingleGPU", "Unit_hipMemMap_PhysicalMemory_Map2MultVMMs", "Unit_hipMemMap_PhysicalMemoryReuse_MultiDev", "Unit_hipMemSetAccess_Vmm2VMMMemCpy", - "SWDEV-444031: This test fails in Navi32 MGPU", + "SWDEV-444031: This test fails in gfx1101 MGPU", "Unit_hipMemSetAccess_Multithreaded", "=== Below test fails in external CI for PR https://github.com/ROCm-Developer-Tools/hip-tests/pull/274 ===", "Unit_Printf_flags_Sanity_Positive", diff --git a/catch/hipTestMain/config/config_amd_wsl.json b/catch/hipTestMain/config/config_amd_wsl.json index 87c022c0ae..45d9d77b69 100644 --- a/catch/hipTestMain/config/config_amd_wsl.json +++ b/catch/hipTestMain/config/config_amd_wsl.json @@ -594,7 +594,7 @@ "Unit_hipGraphicsUnmapResources_Negative_Parameters", "Unit_hipGraphicsUnregisterResource_Negative_Parameters", "Unit_hipGraphExecMemcpyNodeSetParams1D_Negative", - "Note: NAVI3X", + "Note: gfx1100, gfx1101, gfx1102", "=== Below tests soft hang in stress test on 13/09/23 ===", "Unit_hipMemsetFunctional_ZeroValue_hipMemsetD16", "Unit_hipIpcMemAccess_Semaphores", diff --git a/catch/unit/atomics/CMakeLists.txt b/catch/unit/atomics/CMakeLists.txt index 32320e40a0..066b78277e 100644 --- a/catch/unit/atomics/CMakeLists.txt +++ b/catch/unit/atomics/CMakeLists.txt @@ -57,19 +57,19 @@ if(HIP_PLATFORM MATCHES "amd") __hip_atomic_exchange.cc ) - #atomicInc & atomicDec tests are disabled on MI300X due to SWDEV-440688 - set(NOT_FOR_MI300X_TEST + #atomicInc & atomicDec tests are disabled on gfx941 due to SWDEV-440688 + set(NOT_FOR_GFX941_TEST atomicInc.cc atomicDec.cc ) - set(MI300X_TARGET gfx941) + set(GFX941_TARGET gfx941) function(CheckRejectedArchs OFFLOAD_ARCH_STR_LOCAL) set(ARCH_CHECK -1 PARENT_SCOPE) string(REGEX MATCHALL "--offload-arch=gfx[0-9a-z]+" OFFLOAD_ARCH_LIST ${OFFLOAD_ARCH_STR_LOCAL}) foreach(OFFLOAD_ARCH IN LISTS OFFLOAD_ARCH_LIST) string(REGEX MATCHALL "--offload-arch=(gfx[0-9a-z]+)" matches ${OFFLOAD_ARCH}) if (CMAKE_MATCH_COUNT EQUAL 1) - if (CMAKE_MATCH_1 IN_LIST MI300X_TARGET) + if (CMAKE_MATCH_1 IN_LIST GFX941_TARGET) set(ARCH_CHECK 1 PARENT_SCOPE) endif() # CMAKE_MATCH_1 endif() # CMAKE_MATCH_COUNT @@ -84,10 +84,10 @@ if(HIP_PLATFORM MATCHES "amd") set(ARCH_CHECK -1) endif() if(${ARCH_CHECK} EQUAL -1) - message(STATUS "Adding test: ${NOT_FOR_MI300X_TEST}") - set(TEST_SRC ${TEST_SRC} ${NOT_FOR_MI300X_TEST}) + message(STATUS "Adding test: ${NOT_FOR_GFX941_TEST}") + set(TEST_SRC ${TEST_SRC} ${NOT_FOR_GFX941_TEST}) else() - message(STATUS "Removing test: ${NOT_FOR_MI300X_TEST}") + message(STATUS "Removing test: ${NOT_FOR_GFX941_TEST}") endif() diff --git a/catch/unit/deviceLib/fp8.cpp b/catch/unit/deviceLib/fp8.cpp index 103d6dd329..d8a0edb0a7 100644 --- a/catch/unit/deviceLib/fp8.cpp +++ b/catch/unit/deviceLib/fp8.cpp @@ -61,7 +61,7 @@ std::vector cpu_cvt_float_fp8_float(const std::vector& nums) { return ret; } -// This test only makes sense on MI300 where device side convert will use the builtins to convert +// This test only makes sense on gfx94x where device side convert will use the builtins to convert // floats to fp8 TEMPLATE_TEST_CASE("Unit_fp8_compare_host_device", "", float, double) { std::vector numbers = {0.0f, 1.0f, 1.1f, 2.0f, 2.1f, 3.0f, 3.2f, diff --git a/catch/unit/memory/CMakeLists.txt b/catch/unit/memory/CMakeLists.txt index b437801352..e0f4980976 100644 --- a/catch/unit/memory/CMakeLists.txt +++ b/catch/unit/memory/CMakeLists.txt @@ -178,15 +178,15 @@ if(HIP_PLATFORM MATCHES "amd") hipArray3DGetDescriptor.cc) endif() -set(NOT_FOR_MI200_AND_ABOVE_TEST hipMallocArray.cc hipArrayCreate.cc) # tests not for MI200+ -set(MI200_AND_ABOVE_TARGETS gfx90a gfx940 gfx941 gfx942) +set(NOT_FOR_gfx90a_AND_ABOVE_TEST hipMallocArray.cc hipArrayCreate.cc) # tests not for gfx90a+ +set(gfx90a_AND_ABOVE_TARGETS gfx90a gfx940 gfx941 gfx942) function(CheckRejectedArchs OFFLOAD_ARCH_STR_LOCAL) set(ARCH_CHECK -1 PARENT_SCOPE) string(REGEX MATCHALL "--offload-arch=gfx[0-9a-z]+" OFFLOAD_ARCH_LIST ${OFFLOAD_ARCH_STR_LOCAL}) foreach(OFFLOAD_ARCH IN LISTS OFFLOAD_ARCH_LIST) string(REGEX MATCHALL "--offload-arch=(gfx[0-9a-z]+)" matches ${OFFLOAD_ARCH}) if (CMAKE_MATCH_COUNT EQUAL 1) - if (CMAKE_MATCH_1 IN_LIST MI200_AND_ABOVE_TARGETS) + if (CMAKE_MATCH_1 IN_LIST gfx90a_AND_ABOVE_TARGETS) set(ARCH_CHECK 1 PARENT_SCOPE) endif() # CMAKE_MATCH_1 endif() # CMAKE_MATCH_COUNT @@ -201,11 +201,11 @@ if(HIP_PLATFORM MATCHES "amd") set(ARCH_CHECK -1) endif() if(${ARCH_CHECK} EQUAL -1) - message(STATUS "Adding test: ${NOT_FOR_MI200_AND_ABOVE_TEST}") - set(TEST_SRC ${TEST_SRC} ${NOT_FOR_MI200_AND_ABOVE_TEST}) + message(STATUS "Adding test: ${NOT_FOR_gfx90a_AND_ABOVE_TEST}") + set(TEST_SRC ${TEST_SRC} ${NOT_FOR_gfx90a_AND_ABOVE_TEST}) endif() else() - set(TEST_SRC ${TEST_SRC} ${NOT_FOR_MI200_AND_ABOVE_TEST}) + set(TEST_SRC ${TEST_SRC} ${NOT_FOR_gfx90a_AND_ABOVE_TEST}) endif() hip_add_exe_to_target(NAME MemoryTest2 diff --git a/catch/unit/texture/CMakeLists.txt b/catch/unit/texture/CMakeLists.txt index 1fb2278149..2c1bcca14d 100644 --- a/catch/unit/texture/CMakeLists.txt +++ b/catch/unit/texture/CMakeLists.txt @@ -53,8 +53,8 @@ set(TEST_SRC hipMipmappedArrayGetLevel.cc ) -# tests not for MI200+ -set(NOT_FOR_MI200_AND_ABOVE_TEST +# tests not for gfx90a+ +set(NOT_FOR_gfx90a_AND_ABOVE_TEST tex1Dfetch.cc tex1D.cc tex1DLayered.cc @@ -82,14 +82,14 @@ set(NOT_FOR_MI200_AND_ABOVE_TEST tex3DLod.cc tex3DGrad.cc ) -set(MI200_AND_ABOVE_TARGETS gfx90a gfx940 gfx941 gfx942) +set(gfx90a_AND_ABOVE_TARGETS gfx90a gfx940 gfx941 gfx942) function(CheckRejectedArchs OFFLOAD_ARCH_STR_LOCAL) set(ARCH_CHECK -1 PARENT_SCOPE) string(REGEX MATCHALL "--offload-arch=gfx[0-9a-z]+" OFFLOAD_ARCH_LIST ${OFFLOAD_ARCH_STR_LOCAL}) foreach(OFFLOAD_ARCH IN LISTS OFFLOAD_ARCH_LIST) string(REGEX MATCHALL "--offload-arch=(gfx[0-9a-z]+)" matches ${OFFLOAD_ARCH}) if (CMAKE_MATCH_COUNT EQUAL 1) - if (CMAKE_MATCH_1 IN_LIST MI200_AND_ABOVE_TARGETS) + if (CMAKE_MATCH_1 IN_LIST gfx90a_AND_ABOVE_TARGETS) set(ARCH_CHECK 1 PARENT_SCOPE) endif() # CMAKE_MATCH_1 endif() # CMAKE_MATCH_COUNT @@ -105,13 +105,13 @@ if(HIP_PLATFORM MATCHES "amd") set(ARCH_CHECK -1) endif() if(${ARCH_CHECK} EQUAL -1) - message(STATUS "Adding test: ${NOT_FOR_MI200_AND_ABOVE_TEST}") - set(TEST_SRC ${TEST_SRC} ${NOT_FOR_MI200_AND_ABOVE_TEST}) + message(STATUS "Adding test: ${NOT_FOR_gfx90a_AND_ABOVE_TEST}") + set(TEST_SRC ${TEST_SRC} ${NOT_FOR_gfx90a_AND_ABOVE_TEST}) else() - message(STATUS "Removing test: ${NOT_FOR_MI200_AND_ABOVE_TEST}") + message(STATUS "Removing test: ${NOT_FOR_gfx90a_AND_ABOVE_TEST}") endif() else() - set(TEST_SRC ${TEST_SRC} ${NOT_FOR_MI200_AND_ABOVE_TEST}) + set(TEST_SRC ${TEST_SRC} ${NOT_FOR_gfx90a_AND_ABOVE_TEST}) endif() if(WIN32) diff --git a/samples/0_Intro/square/README.md b/samples/0_Intro/square/README.md index 61ae6fa84c..275d3a34a8 100644 --- a/samples/0_Intro/square/README.md +++ b/samples/0_Intro/square/README.md @@ -28,7 +28,7 @@ $ Building without cmake - Execute file ``` $ ./square.out -info: running on device Navi 14 [Radeon Pro W5500] +info: running on device AMD Radeon RX 6900 XT info: allocate host mem ( 7.63 MB) info: allocate device mem ( 7.63 MB) info: copy Host2Device diff --git a/samples/2_Cookbook/0_MatrixTranspose/Readme.md b/samples/2_Cookbook/0_MatrixTranspose/Readme.md index ce1ef096f8..8f52e18c40 100644 --- a/samples/2_Cookbook/0_MatrixTranspose/Readme.md +++ b/samples/2_Cookbook/0_MatrixTranspose/Readme.md @@ -96,7 +96,7 @@ $ make - Execute the sample ``` $ ./MatrixTranspose -Device name Navi 14 [Radeon Pro W5500] +Device name AMD Radeon RX 6900 XT PASSED! ``` diff --git a/samples/2_Cookbook/1_hipEvent/Readme.md b/samples/2_Cookbook/1_hipEvent/Readme.md index b8ed12d1c5..dbd55db748 100644 --- a/samples/2_Cookbook/1_hipEvent/Readme.md +++ b/samples/2_Cookbook/1_hipEvent/Readme.md @@ -75,7 +75,7 @@ $ make - Execute the sample ``` $ ./hipEvent -Device name Navi 14 [Radeon Pro W5500] +Device name AMD Radeon RX 6900 XT hipMemcpyHostToDevice time taken = 0.981ms kernel Execution time = 0.539ms hipMemcpyDeviceToHost time taken = 1.220ms diff --git a/samples/2_Cookbook/3_shared_memory/Readme.md b/samples/2_Cookbook/3_shared_memory/Readme.md index b0d928c004..dda780c078 100644 --- a/samples/2_Cookbook/3_shared_memory/Readme.md +++ b/samples/2_Cookbook/3_shared_memory/Readme.md @@ -37,7 +37,7 @@ $ make - Execute the sample ``` $ ./sharedMemory -Device name Navi 14 [Radeon Pro W5500] +Device name AMD Radeon RX 6900 XT PASSED! ``` diff --git a/samples/2_Cookbook/4_shfl/Readme.md b/samples/2_Cookbook/4_shfl/Readme.md index 87375e8ea6..5cb91c0cdf 100644 --- a/samples/2_Cookbook/4_shfl/Readme.md +++ b/samples/2_Cookbook/4_shfl/Readme.md @@ -45,7 +45,7 @@ $ make - Execute the sample ``` $ ./shfl -Device name Navi 14 [Radeon Pro W5500] +Device name AMD Radeon RX 6900 XT PASSED! ``` ## requirement for nvidia diff --git a/samples/2_Cookbook/5_2dshfl/Readme.md b/samples/2_Cookbook/5_2dshfl/Readme.md index f57249cb67..29294213f7 100644 --- a/samples/2_Cookbook/5_2dshfl/Readme.md +++ b/samples/2_Cookbook/5_2dshfl/Readme.md @@ -47,7 +47,7 @@ $ make - Execute the sample ``` $ ./2dshfl -Device name Navi 14 [Radeon Pro W5500] +Device name AMD Radeon RX 6900 XT PASSED! ``` ## requirement for nvidia diff --git a/samples/2_Cookbook/6_dynamic_shared/Readme.md b/samples/2_Cookbook/6_dynamic_shared/Readme.md index d932f7f430..239c6f98b6 100644 --- a/samples/2_Cookbook/6_dynamic_shared/Readme.md +++ b/samples/2_Cookbook/6_dynamic_shared/Readme.md @@ -47,7 +47,7 @@ $ make - Execute the sample ``` $ ./dynamic_shared -Device name Navi 14 [Radeon Pro W5500] +Device name AMD Radeon RX 6900 XT dynamic_shared PASSED! ```