CMakeDetermineHIPCompiler: fix missing multiarch search path

In Debian/Ubuntu hip-lang-config.cmake is installed in multiarch path
and while searching for it we should have a proper fall back to systems
LIBRARY_ARCHITECTURE variable

MR in Debian: https://salsa.debian.org/cmake-team/cmake/-/merge_requests/15
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/cmake/+bug/2143705
This commit is contained in:
Talha Can Havadar authored and Brad King committed 2026-03-10 09:56:42 -04:00
1 parent b121cf2c61
commit e8381e42ef
1 file changed
+2
+2
View File
@@ -242,6 +242,8 @@ if(CMAKE_HIP_PLATFORM STREQUAL "amd" OR CMAKE_HIP_PLATFORM STREQUAL "spirv")
)
if(CMAKE_HIP_LIBRARY_ARCHITECTURE)
list(APPEND _CMAKE_HIP_COMPILER_ROCM_LIB_DIRS "${CMAKE_HIP_COMPILER_ROCM_ROOT}/lib/${CMAKE_HIP_LIBRARY_ARCHITECTURE}")
elseif(CMAKE_LIBRARY_ARCHITECTURE)
list(APPEND _CMAKE_HIP_COMPILER_ROCM_LIB_DIRS "${CMAKE_HIP_COMPILER_ROCM_ROOT}/lib/${CMAKE_LIBRARY_ARCHITECTURE}")
endif()
foreach(dir IN LISTS _CMAKE_HIP_COMPILER_ROCM_LIB_DIRS)
if(EXISTS "${dir}/cmake/hip-lang/hip-lang-config.cmake")