From 52fae9b09be817ff532cbd04c0e6e7e5091e6e35 Mon Sep 17 00:00:00 2001 From: Tom Rix Date: Thu, 31 Jul 2025 14:28:45 -0700 Subject: [PATCH] Backport to f42 Signed-off-by: Tom Rix --- .gitignore | 1 + rocm-examples.spec | 30 +++++++++++++++++++++++++----- sources | 2 +- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 2db8977..bdfc5dc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /rocm-examples-6.3.3.tar.gz /rocm-examples-6.4.0.tar.gz /rocm-examples-6.4.1.tar.gz +/rocm-examples-6.3.1.tar.gz diff --git a/rocm-examples.spec b/rocm-examples.spec index c759a3d..d5a7700 100644 --- a/rocm-examples.spec +++ b/rocm-examples.spec @@ -1,5 +1,5 @@ %global upstreamname rocm-examples -%global rocm_release 6.4 +%global rocm_release 6.3 %global rocm_patch 1 %global rocm_version %{rocm_release}.%{rocm_patch} @@ -8,6 +8,9 @@ # hipcc does not support some clang flags %global build_cxxflags %(echo %{optflags} | sed -e 's/-fstack-protector-strong/-Xarch_host -fstack-protector-strong/' -e 's/-fcf-protection/-Xarch_host -fcf-protection/' ) +# $gpu will be evaluated in the loops below +%global _vpath_builddir %{_vendor}-%{_target_os}-build-${gpu} + %bcond_with debug %if %{with debug} %global build_type DEBUG @@ -49,6 +52,7 @@ BuildRequires: rocm-comgr-devel BuildRequires: rocm-hip-devel BuildRequires: rocm-runtime-devel BuildRequires: rocm-rpm-macros +BuildRequires: rocm-rpm-macros-modules BuildRequires: rocblas-devel BuildRequires: rocfft-devel BuildRequires: rocsolver-devel @@ -63,6 +67,8 @@ BuildRequires: google-benchmark-devel BuildRequires: gtest-devel %endif +Requires: rocm-rpm-macros-modules + # Only x86_64 works right now: ExclusiveArch: x86_64 @@ -115,17 +121,28 @@ sed -i -e 's@add_subdirectory(module_api)@message("no module_api")@' HIP-Basi %endif %build -%cmake \ +for gpu in %{rocm_gpu_list} +do + module load rocm/$gpu + %cmake \ -DCMAKE_CXX_COMPILER=hipcc \ - -DCMAKE_HIP_ARCHITECTURES=%{rocm_gpu_list_default} \ - -DAMDGPU_TARGETS=%{rocm_gpu_list_default} \ + -DAMDGPU_TARGETS=${ROCM_GPUS} \ + -DCMAKE_INSTALL_LIBDIR=$ROCM_LIB \ + -DCMAKE_INSTALL_BINDIR=$ROCM_BIN \ -DCMAKE_BUILD_TYPE=%{build_type} \ -DHIP_PLATFORM=amd + %cmake_build + module purge +done + %cmake_build %install -%cmake_install +for gpu in %{rocm_gpu_list} +do + %cmake_install +done %files %license LICENSE.md @@ -133,6 +150,9 @@ sed -i -e 's@add_subdirectory(module_api)@message("no module_api")@' HIP-Basi %{_bindir}/* %changelog +* Thu Jul 31 2025 Tom Rix - 6.3.1-1 +- Backport to f42 + * Sun Jun 1 2025 Tom Rix - 6.4.1-1 - Update to 6.4.1 diff --git a/sources b/sources index 4bd9d66..e0c5cba 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (rocm-examples-6.4.1.tar.gz) = c88a3469bd59a1ea87dd222d06950e23169a3c03e590d289d8cf99db26e7c44740d9a7c105cada33cce9ce69cc769e68ccf7cd3a8b6296b890afc6e175f339ea +SHA512 (rocm-examples-6.3.1.tar.gz) = 5c25e617a0494ccb9ad6f47f8ea2f172a4d8c0145d63ab1d856f4294db6fbce4ccbc5bf16fd1ea96408ff1364cbeea861cc5210fca853fdc35c9976f64b5d05b