diff --git a/.gitignore b/.gitignore index 1ce2846..d12f538 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /ROCm-Device-Libs-5.4.1.tar.gz /ROCm-Device-Libs-16.0.tar.gz /ROCm-Device-Libs-16.1.tar.gz +/ROCm-Device-Libs-16.2.tar.gz diff --git a/0001-Use-FHS-compliant-install.patch b/0001-Use-FHS-compliant-install.patch deleted file mode 100644 index 3085221..0000000 --- a/0001-Use-FHS-compliant-install.patch +++ /dev/null @@ -1,86 +0,0 @@ -From ac607351aef320bc31cf3df65f82d51f2ac90916 Mon Sep 17 00:00:00 2001 -From: Mystro256 -Date: Tue, 18 Jan 2022 12:50:05 -0500 -Subject: [PATCH] Use FHS compliant install - -FHS does not allow installing to "amdgcn", but "LIBDIR/amdgcn" appears -to be acceptable to the FHS and distros. This logic uses GNUInstallDirs -to detect the LIBDIR instead of hardcoding it to "lib". - -E.g. Fedora/Redhat use lib64 instead of lib. ---- - cmake/OCL.cmake | 3 ++- - cmake/Packages.cmake | 2 +- - test/compile/CMakeLists.txt | 2 ++ - test/compile/RunConstantFoldTest.cmake | 1 + - 4 files changed, 6 insertions(+), 2 deletions(-) - -diff --git a/cmake/OCL.cmake b/cmake/OCL.cmake -index 773c6f6..3252082 100644 ---- a/cmake/OCL.cmake -+++ b/cmake/OCL.cmake -@@ -10,6 +10,7 @@ - # configure_file and we are included from multiple places. To get around this - # we `file(WRITE)` a file with an @variable reference and `configure_file` it. - cmake_policy(SET CMP0053 OLD) -+include(GNUInstallDirs) - - if (WIN32) - set(EXE_SUFFIX ".exe") -@@ -46,7 +47,7 @@ set (BC_EXT .bc) - set (LIB_SUFFIX ".lib${BC_EXT}") - set (STRIP_SUFFIX ".strip${BC_EXT}") - set (FINAL_SUFFIX "${BC_EXT}") --set (INSTALL_ROOT_SUFFIX "amdgcn/bitcode") -+set (INSTALL_ROOT_SUFFIX "${CMAKE_INSTALL_LIBDIR}/amdgcn/bitcode") - - # Set `inc_options` to contain Clang command-line for include directories for - # current source directory. -diff --git a/cmake/Packages.cmake b/cmake/Packages.cmake -index 07c60eb..f128365 100644 ---- a/cmake/Packages.cmake -+++ b/cmake/Packages.cmake -@@ -16,7 +16,7 @@ configure_file(AMDDeviceLibsConfig.cmake.in - @ONLY) - - --set(install_path_suffix "amdgcn/bitcode") -+set(install_path_suffix "${CMAKE_INSTALL_LIBDIR}/amdgcn/bitcode") - - # Generate the install-tree package. - # We do not know the absolute path to the intall tree until we are installed, -diff --git a/test/compile/CMakeLists.txt b/test/compile/CMakeLists.txt -index 9af0b1a..3fe348b 100644 ---- a/test/compile/CMakeLists.txt -+++ b/test/compile/CMakeLists.txt -@@ -4,6 +4,7 @@ - ## This file is distributed under the University of Illinois Open Source - ## License. See LICENSE.TXT for details. - ##===-------------------------------------------------------------------------- -+include(GNUInstallDirs) - - if(TARGET FileCheck) - set(FILECHECK_BIN $) -@@ -30,6 +31,7 @@ function(add_compile_test test_name func_name script test_cpu extra_check_prefix - -DFILECHECK_BIN=${FILECHECK_BIN} - -DOUTPUT_FILE=output.${name}.${test_cpu}.s - -DINPUT_FILE=${CMAKE_CURRENT_SOURCE_DIR}/${func_name}.cl -+ -DAMDGCN_BITCODES=${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/amdgcn/bitcode - -DTEST_CPU=${test_cpu} - -DEXTRA_CHECK_PREFIX=${extra_check_prefixes} - -P ${script}) -diff --git a/test/compile/RunConstantFoldTest.cmake b/test/compile/RunConstantFoldTest.cmake -index 5424690..1d4241a 100644 ---- a/test/compile/RunConstantFoldTest.cmake -+++ b/test/compile/RunConstantFoldTest.cmake -@@ -16,6 +16,7 @@ execute_process(COMMAND - -target amdgcn-amd-amdhsa -mcpu=${TEST_CPU} - -Xclang -finclude-default-header - --rocm-path=${BINARY_DIR} -+ --rocm-device-lib-path=${AMDGCN_BITCODES} - -mllvm -amdgpu-simplify-libcall=0 - -o ${OUTPUT_FILE} ${INPUT_FILE} - RESULT_VARIABLE CLANG_RESULT --- -2.39.2 - diff --git a/rocm-device-libs.spec b/rocm-device-libs.spec index 9da5c55..ad6476a 100644 --- a/rocm-device-libs.spec +++ b/rocm-device-libs.spec @@ -5,7 +5,7 @@ # If you bump LLVM, please reset bugfix_version to 0; I fork upstream sources, # but I prepare the initial *.0 tag long before Fedora/EL picks up new LLVM. # An LLVM update will require uploading new sources, contact mystro256 if FTBFS. -%global bugfix_version 1 +%global bugfix_version 2 %global upstreamname ROCm-Device-Libs Name: rocm-device-libs @@ -18,9 +18,6 @@ License: NCSA # I fork upstream sources because they don't target stable LLVM, but rather the # bleeding edge LLVM branch. My fork is a snapshot with bugfixes backported: Source0: https://github.com/mystro256/%{upstreamname}/archive/refs/tags/%{version}.tar.gz#/%{upstreamname}-%{version}.tar.gz -# Upstream is working on a solution, patch is adapted from debian: -#https://salsa.debian.org/rocm-team/rocm-device-libs/-/blob/master/debian/patches/cmake-amdgcn-bitcode.patch -Patch0: 0001-Use-FHS-compliant-install.patch BuildRequires: cmake BuildRequires: clang-devel @@ -28,6 +25,7 @@ BuildRequires: clang(major) = %{llvm_maj_ver} BuildRequires: llvm-devel(major) = %{llvm_maj_ver} BuildRequires: zlib-devel Requires: clang(major) = %{llvm_maj_ver} +Requires: clang-resource-filesystem #Only the following architectures are useful for ROCm packages: ExclusiveArch: x86_64 aarch64 ppc64le @@ -58,9 +56,12 @@ libraries in the form of bit code. Specifically: # No need to install this twice: %exclude %{_docdir}/ROCm-Device-Libs/LICENSE.TXT %{_libdir}/cmake/AMDDeviceLibs -%{_libdir}/amdgcn +%{_libdir}/clang/%{llvm_maj_ver}/amdgcn %changelog +* Thu Jun 01 2023 Jeremy Newton - 16.2-1 +- Update to 16.2 + * Wed Apr 19 2023 Jeremy Newton - 16.1-1 - Update to 16.1 diff --git a/sources b/sources index 5626fb6..c7fe9b7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ROCm-Device-Libs-16.1.tar.gz) = a61aa972a046bc3bc7b97eefd20b527cd32b02fa8ae4a5c1dad90b1897ffeafd9151a58102d0c49953c497f7fe5a96c4f4de0ae59e086ab4fd82f1d85619e429 +SHA512 (ROCm-Device-Libs-16.2.tar.gz) = ec4132bf6e4ab2cf1225ba78355c7612a9b9815a67def58ecff40fd286cb1fb3c79a0b26435da0135c465857e23b7e4364b592c0ae232f94c2aef2b2be0ce746