Page Menu
Home
Solus
Search
Configure Global Search
Log In
Files
F11037284
D13161.id32163.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
12 KB
Referenced Files
None
Subscribers
None
D13161.id32163.diff
View Options
Index: Makefile
===================================================================
--- /dev/null
+++ Makefile
@@ -0,0 +1 @@
+include ../Makefile.common
Index: README.md
===================================================================
--- /dev/null
+++ README.md
@@ -0,0 +1,3 @@
+# rocm-device-libs
+
+The rocm-device-libs package
Index: files/0001-Use-FHS-compliant-install.patch
===================================================================
--- /dev/null
+++ files/0001-Use-FHS-compliant-install.patch
@@ -0,0 +1,59 @@
+From 61ff1491e80c7199bc79aa442cdcfb55986e774b Mon Sep 17 00:00:00 2001
+From: Mystro256 <alexjnewt@hotmail.com>
+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 | 5 +++--
+ 2 files changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/cmake/OCL.cmake b/cmake/OCL.cmake
+index 4e324e8..5bde654 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")
+@@ -33,7 +34,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 715ed95..e948e96 100644
+--- a/cmake/Packages.cmake
++++ b/cmake/Packages.cmake
+@@ -1,4 +1,5 @@
+-set(PACKAGE_PREFIX lib/cmake/AMDDeviceLibs)
++include(GNUInstallDirs)
++set(PACKAGE_PREFIX ${CMAKE_INSTALL_LIBDIR}/cmake/AMDDeviceLibs)
+
+ # Generate the build-tree package.
+ # We know the absolute path to the build tree, so we leave
+@@ -16,7 +17,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,
+--
+2.31.1
+
Index: package.yml
===================================================================
--- /dev/null
+++ package.yml
@@ -0,0 +1,25 @@
+name : rocm-device-libs
+version : 5.1.0
+release : 1
+source :
+ - https://github.com/RadeonOpenCompute/ROCm-Device-Libs/archive/refs/tags/rocm-5.1.0.tar.gz : 47dbcb41fb4739219cadc9f2b5f21358ed2f9895ce786d2f7a1b2c4fd044d30f
+license : NCSA
+component : xorg.driver
+clang : yes
+homepage : https://github.com/RadeonOpenCompute
+summary : ROCm Device Libraries
+description: |
+ This package contains a set of AMD specific device-side language runtime libraries in the form of bit code. Specifically:
+ - Open Compute library controls
+ - Open Compute Math library
+ - Open Compute Kernel library
+ - OpenCL built-in library
+ - HIP built-in library
+ - Heterogeneous Compute built-in library
+setup : |
+ %patch -p1 < $pkgfiles/0001-Use-FHS-compliant-install.patch
+ %cmake_ninja
+build : |
+ %ninja_build
+install : |
+ %ninja_install
Index: pspec_x86_64.xml
===================================================================
--- /dev/null
+++ pspec_x86_64.xml
@@ -0,0 +1,96 @@
+<PISI>
+ <Source>
+ <Name>rocm-device-libs</Name>
+ <Packager>
+ <Name>Jacek Jagosz</Name>
+ <Email>jacek.jagosz@outlook.com</Email>
+ </Packager>
+ <License>NCSA</License>
+ <PartOf>xorg.driver</PartOf>
+ <Summary xml:lang="en">PLEASE FILL ME IN</Summary>
+ <Description xml:lang="en">PLEASE FILL ME IN
+</Description>
+ <Archive type="binary" sha1sum="79eb0752a961b8e0d15c77d298c97498fbc89c5a">https://getsol.us/sources/README.Solus</Archive>
+ </Source>
+ <Package>
+ <Name>rocm-device-libs</Name>
+ <Summary xml:lang="en">PLEASE FILL ME IN</Summary>
+ <Description xml:lang="en">PLEASE FILL ME IN
+</Description>
+ <PartOf>xorg.driver</PartOf>
+ <Files>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/asanrtl.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/hip.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/ockl.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_abi_version_400.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_abi_version_500.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_correctly_rounded_sqrt_off.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_correctly_rounded_sqrt_on.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_daz_opt_off.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_daz_opt_on.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_finite_only_off.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_finite_only_on.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_isa_version_1010.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_isa_version_1011.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_isa_version_1012.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_isa_version_1013.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_isa_version_1030.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_isa_version_1031.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_isa_version_1032.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_isa_version_1033.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_isa_version_1034.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_isa_version_1035.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_isa_version_600.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_isa_version_601.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_isa_version_602.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_isa_version_700.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_isa_version_701.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_isa_version_702.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_isa_version_703.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_isa_version_704.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_isa_version_705.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_isa_version_801.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_isa_version_802.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_isa_version_803.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_isa_version_805.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_isa_version_810.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_isa_version_900.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_isa_version_902.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_isa_version_904.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_isa_version_906.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_isa_version_908.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_isa_version_909.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_isa_version_90a.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_isa_version_90c.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_unsafe_math_off.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_unsafe_math_on.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_wavefrontsize64_off.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/oclc_wavefrontsize64_on.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/ocml.bc</Path>
+ <Path fileType="library">/usr/lib64/amdgcn/bitcode/opencl.bc</Path>
+ <Path fileType="doc">/usr/share/doc/ROCm-Device-Libs/rocm-device-libs/LICENSE.TXT</Path>
+ </Files>
+ </Package>
+ <Package>
+ <Name>rocm-device-libs-devel</Name>
+ <Summary xml:lang="en">Development files for rocm-device-libs</Summary>
+ <Description xml:lang="en">PLEASE FILL ME IN
+</Description>
+ <PartOf>programming.devel</PartOf>
+ <RuntimeDependencies>
+ <Dependency release="1">rocm-device-libs</Dependency>
+ </RuntimeDependencies>
+ <Files>
+ <Path fileType="library">/usr/lib64/cmake/AMDDeviceLibs/AMDDeviceLibsConfig.cmake</Path>
+ </Files>
+ </Package>
+ <History>
+ <Update release="1">
+ <Date>2022-04-09</Date>
+ <Version>5.1.0</Version>
+ <Comment>Packaging update</Comment>
+ <Name>Jacek Jagosz</Name>
+ <Email>jacek.jagosz@outlook.com</Email>
+ </Update>
+ </History>
+</PISI>
\ No newline at end of file
Index: rocm-device-libs.spec
===================================================================
--- /dev/null
+++ rocm-device-libs.spec
@@ -0,0 +1,72 @@
+# bitcode has no debuginfo
+%global debug_package %{nil}
+
+%global llvm_maj_ver 14
+%global upstreamname ROCm-Device-Libs
+
+Name: rocm-device-libs
+Version: 5.1.0
+Release: 3%{?dist}
+Summary: AMD ROCm LLVM bit code libraries
+
+Url: https://github.com/RadeonOpenCompute/ROCm-Device-Libs
+License: NCSA
+Source0: https://github.com/RadeonOpenCompute/%{upstreamname}/archive/refs/tags/rocm-%{version}.tar.gz#/%{upstreamname}-%{version}.tar.gz
+# Upstream is working on a solution:
+Patch0: 0001-Use-FHS-compliant-install.patch
+
+BuildRequires: cmake
+BuildRequires: clang-devel
+BuildRequires: clang(major) = %{llvm_maj_ver}
+BuildRequires: llvm-devel(major) = %{llvm_maj_ver}
+BuildRequires: zlib-devel
+Requires: clang(major) = %{llvm_maj_ver}
+
+#Only the following architectures are useful for ROCm packages:
+ExclusiveArch: x86_64 aarch64 ppc64le
+
+%description
+This package contains a set of AMD specific device-side language runtime
+libraries in the form of bit code. Specifically:
+ - Open Compute library controls
+ - Open Compute Math library
+ - Open Compute Kernel library
+ - OpenCL built-in library
+ - HIP built-in library
+ - Heterogeneous Compute built-in library
+
+%prep
+%autosetup -p1 -n %{upstreamname}-rocm-%{version}
+
+%build
+%cmake -DCMAKE_BUILD_TYPE="RELEASE"
+%cmake_build
+
+%install
+%cmake_install
+
+%files
+%license LICENSE.TXT
+%doc README.md doc/*.md
+# No need to install this twice:
+%exclude %{_docdir}/ROCm-Device-Libs/rocm-device-libs/LICENSE.TXT
+%{_libdir}/cmake/AMDDeviceLibs
+%{_libdir}/amdgcn
+
+%changelog
+* Tue Apr 05 2022 Jeremy Newton <alexjnewt at hotmail dot com> - 5.1.0-3
+- Enable ppc64le
+
+* Thu Mar 31 2022 Jeremy Newton <alexjnewt at hotmail dot com> - 5.1.0-2
+- Add clang specific major version requires
+- BR a specific clang/llvm major version combination
+
+* Thu Mar 31 2022 Jeremy Newton <alexjnewt at hotmail dot com> - 5.1.0-1
+- Update to 5.1.0
+- Add llvm version requirement to make sure the right version is used
+
+* Fri Feb 11 2022 Jeremy Newton <alexjnewt at hotmail dot com> - 5.0.0-1
+- Update to 5.0.0
+
+* Mon Jan 17 2022 Jeremy Newton <alexjnewt at hotmail dot com> - 4.5.2-1
+- Initial package
Index: sources
===================================================================
--- /dev/null
+++ sources
@@ -0,0 +1 @@
+SHA512 (ROCm-Device-Libs-5.1.0.tar.gz) = e85f471dd4a1e38c72ec94bee67bf3be116942ba5f9ef42c9fd2016d252ef138dab9d1d42ceffe05e52e93e8786e392ade6b553a874baf41041a50c9e7f79fb4
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Aug 10, 8:22 PM (1 d, 4 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5816362
Default Alt Text
D13161.id32163.diff (12 KB)
Attached To
Mode
D13161: [RFC] Initial commit of rocm-device-libs for T6614
Attached
Detach File
Event Timeline
Log In to Comment