Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
Tom Rix
52fae9b09b Backport to f42
Signed-off-by: Tom Rix <Tom.Rix@amd.com>
2025-07-31 14:28:45 -07:00
3 changed files with 27 additions and 6 deletions

1
.gitignore vendored
View file

@ -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

View file

@ -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 <Tom.Rix@amd.com> - 6.3.1-1
- Backport to f42
* Sun Jun 1 2025 Tom Rix <Tom.Rix@amd.com> - 6.4.1-1
- Update to 6.4.1

View file

@ -1 +1 @@
SHA512 (rocm-examples-6.4.1.tar.gz) = c88a3469bd59a1ea87dd222d06950e23169a3c03e590d289d8cf99db26e7c44740d9a7c105cada33cce9ce69cc769e68ccf7cd3a8b6296b890afc6e175f339ea
SHA512 (rocm-examples-6.3.1.tar.gz) = 5c25e617a0494ccb9ad6f47f8ea2f172a4d8c0145d63ab1d856f4294db6fbce4ccbc5bf16fd1ea96408ff1364cbeea861cc5210fca853fdc35c9976f64b5d05b