···14, fetchurl
15, gfortran
16, gpuTargets ? [ ] # Non-CUDA targets, that is HIP
17-, rocmPackages
18, lapack
19, lib
20, libpthreadstubs
···4344 inherit (effectiveCudaPackages) cudaAtLeast cudaFlags cudaOlder;
45 inherit (cudaFlags) cudaCapabilities;
0004647 # NOTE: The lists.subtractLists function is perhaps a bit unintuitive. It subtracts the elements
48 # of the first list *from* the second list. That means:
···14, fetchurl
15, gfortran
16, gpuTargets ? [ ] # Non-CUDA targets, that is HIP
17+, rocmPackages_5
18, lapack
19, lib
20, libpthreadstubs
···4344 inherit (effectiveCudaPackages) cudaAtLeast cudaFlags cudaOlder;
45 inherit (cudaFlags) cudaCapabilities;
46+47+ # move to newer ROCm version once supported
48+ rocmPackages = rocmPackages_5;
4950 # NOTE: The lists.subtractLists function is perhaps a bit unintuitive. It subtracts the elements
51 # of the first list *from* the second list. That means:
···1+diff --git a/cmake/Packages.cmake b/cmake/Packages.cmake
2+index 07c60eb..c736b3e 100644
3+--- a/cmake/Packages.cmake
4++++ b/cmake/Packages.cmake
5+@@ -12,24 +12,29 @@ set_target_properties(${target} PROPERTIES
6+ IMPORTED_LOCATION \"${target_path}\")")
7+ endforeach()
8+ configure_file(AMDDeviceLibsConfig.cmake.in
9+- ${PACKAGE_PREFIX}/AMDDeviceLibsConfig.cmake
10++ lib/cmake/AMDDeviceLibs/AMDDeviceLibsConfig.cmake
11+ @ONLY)
12+13+14+ set(install_path_suffix "amdgcn/bitcode")
15+16+ # Generate the install-tree package.
17+-# We do not know the absolute path to the intall tree until we are installed,
18+-# so we calculate it dynamically in AMD_DEVICE_LIBS_PREFIX_CODE and use
19+-# relative paths in the target imports in AMD_DEVICE_LIBS_TARGET_CODE.
20+-set(AMD_DEVICE_LIBS_PREFIX_CODE "
21++if(IS_ABSOLUTE "${CMAKE_INSTALL_PREFIX}")
22++ set(AMD_DEVICE_LIBS_PREFIX_CODE "set(AMD_DEVICE_LIBS_PREFIX \"${CMAKE_INSTALL_PREFIX}\")")
23++else()
24++ # We do not know the absolute path to the install tree until we are installed,
25++ # so we calculate it dynamically in AMD_DEVICE_LIBS_PREFIX_CODE and use
26++ # relative paths in the target imports in AMD_DEVICE_LIBS_TARGET_CODE.
27++ set(AMD_DEVICE_LIBS_PREFIX_CODE "
28+ # Derive absolute install prefix from config file path.
29+ get_filename_component(AMD_DEVICE_LIBS_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)")
30+-string(REGEX REPLACE "/" ";" count "${PACKAGE_PREFIX}")
31+-foreach(p ${count})
32+- set(AMD_DEVICE_LIBS_PREFIX_CODE "${AMD_DEVICE_LIBS_PREFIX_CODE}
33++ string(REGEX REPLACE "/" ";" count "${PACKAGE_PREFIX}")
34++ foreach(p ${count})
35++ set(AMD_DEVICE_LIBS_PREFIX_CODE "${AMD_DEVICE_LIBS_PREFIX_CODE}
36+ get_filename_component(AMD_DEVICE_LIBS_PREFIX \"\${AMD_DEVICE_LIBS_PREFIX}\" PATH)")
37+-endforeach()
38++ endforeach()
39++endif()
40++
41+ set(AMD_DEVICE_LIBS_TARGET_CODE)
42+ foreach(target ${AMDGCN_LIB_LIST})
43+ get_target_property(target_name ${target} ARCHIVE_OUTPUT_NAME)