# # 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 Name: rocrtst Version: %{rocm_version} Release: 2%{?dist} Summary: ROCm Runtime test suite # bundled hwloc is BSD, everything in rocrtst/gtest is BSD License: NCSA and BSD-3-Clause 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-clang BuildRequires: rocm-clang-runtime-devel BuildRequires: rocm-compilersupport-macros BuildRequires: rocm-device-libs BuildRequires: rocm-runtime-devel BuildRequires: amdsmi-devel %if 0%{?suse_version} BuildRequires: libnuma-devel %else BuildRequires: numactl-devel %endif Provides: bundled(hwloc) = %{hwloc_version} %description This is the test suite for the ROCm Runtime Library. %prep %autosetup -n ROCR-Runtime-rocm-%{version} -p3 -a 1 # Delete extra bits we don't need for rocrtst: ls | grep -v LICENSE | grep -v rocrtst | grep -v hwloc | xargs rm -r # 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_build popd %cmake \ -DOPENCL_DIR=%rocmllvm_libdir/clang/%rocmllvm_version \ -DLLVM_DIR=%rocmllvm_bindir \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -S rocrtst/suites/test_common %cmake_build %install %cmake_install %files %doc rocrtst/README.md %license LICENSE.txt %{_bindir}/%{name}64 # These are a bunch of symlinks that we can probably ignore: %exclude %{_bindir}/gfx* %changelog * Fri Nov 21 2025 Jeremy Newton - 7.1.0-2 - Enable clang, which builds kernels * Mon Nov 03 2025 Jeremy Newton - 7.1.0-1 - Initial package