# # Copyright Fedora Project Authors. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. # %global rocm_release 7.1 %global rocm_patch 0 %global rocm_version %{rocm_release}.%{rocm_patch} %global hwloc_version 1.11.13 # WIP this doesn't work yet: %bcond_with clang Name: rocrtst Version: %{rocm_version} Release: 1%{?dist} Summary: ROCm Runtime test suite License: NCSA URL: https://github.com/ROCm/ROCR-Runtime Source0: %{url}/archive/rocm-%{version}.tar.gz#/rocm-runtime-%{version}.tar.gz Source1: http://www.open-mpi.org/software/hwloc/v1.11/downloads/hwloc-%{hwloc_version}.tar.bz2 ExclusiveArch: x86_64 BuildRequires: cmake BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: make BuildRequires: rocm-runtime-devel BuildRequires: amdsmi-devel %if %{with rocrtst} BuildRequires: rocm-clang BuildRequires: rocm-compilersupport-macros BuildRequires: rocm-device-libs %endif %if 0%{?suse_version} BuildRequires: libnuma-devel %else BuildRequires: numactl-devel %endif Provides: bundled(hwloc) = %{hwloc_version} %description The ROCm Runtime Library is a thin, user-mode API that exposes the necessary interfaces to access and interact with graphics hardware driven by the AMDGPU driver set and the AMDKFD kernel driver. Together they enable programmers to directly harness the power of AMD discrete graphics devices by allowing host applications to launch compute kernels directly to the graphics hardware. %package devel Summary: ROCm Runtime development files Requires: %{name}%{?_isa} = %{version}-%{release} Provides: hsakmt-devel = %{version}-%{release} Obsoletes: hsakmt-devel < 6.3 Provides: rocm-runtime-devel = %{version}-%{release} %description devel ROCm Runtime development files %prep %autosetup -n ROCR-Runtime-rocm-%{version} -p1 -a 1 # Delete bundled hwlov headers and binaries: rm -r rocrtst/thirdparty/include/* rm -r rocrtst/thirdparty/lib/ # Use updated headers via symlinks: ln -s $(pwd)/hwloc-%{hwloc_version}/include/hwloc.h rocrtst/thirdparty/include ln -s $(pwd)/hwloc-%{hwloc_version}/include/hwloc rocrtst/thirdparty/include # Link to static bundled static hwloc, drop rpath, don't install hwloc sed -i -e "/thirdparty\/lib DESTINATION/d" -e "/INSTALL_RPATH/d" \ -e "s|thirdparty/lib/libhwloc.so.5|../hwloc-%{hwloc_version}/src/.libs/libhwloc.a|" \ rocrtst/suites/test_common/CMakeLists.txt %build # Build hwloc first pushd hwloc-%{hwloc_version}/ %configure --disable-silent-rules --disable-cairo --disable-cpuid \ --disable-libxml2 --disable-pci --disable-opencl --disable-cuda \ --disable-libudev --enable-static # drop hwloc rpath sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool make %{?_smp_mflags} popd export PATH=%{rocmllvm_bindir}:$PATH %cmake \ %if %{with rocrtst} -DLLVM_DIR=%rocmllvm_bindir \ %endif -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -S rocrtst/suites/test_common %cmake_build %install %cmake_install %ldconfig_scriptlets %files %doc README.md %license LICENSE.txt %{_bindir}/%{name}64 # These are a bunch of symlinks that we can probably ignore: %exclude %{_bindir}/gfx* %changelog * Mon Nov 03 2025 Jeremy Newton - 7.1.0-1 - Initial package