Compare commits
6 Commits
retired
...
216f9d4756
Author | SHA256 | Date | |
---|---|---|---|
216f9d4756 | |||
2a13359556 | |||
669d97c4e6 | |||
9d12c41c8a | |||
67a6c9e2bc | |||
3a6378ba01 |
3
rocblas.rpmlintrc
Normal file
3
rocblas.rpmlintrc
Normal file
@@ -0,0 +1,3 @@
|
||||
# librocblas4-arch-.* are no shared libraries but modules loaded onto the GPU.
|
||||
addFilter("rocblas-arch-.*: W: shared-lib-without-dependency-information")
|
||||
addFilter("rocblas-arch-.*: E: shlib-fixed-dependency.")
|
121
rocblas.spec
121
rocblas.spec
@@ -9,6 +9,15 @@
|
||||
%global rocm_patch 0
|
||||
%global rocm_version %{rocm_release}.%{rocm_patch}
|
||||
|
||||
%if 0%{?suse_version}
|
||||
# On SUSE build the .so module only - tensile modules are built in a separate package
|
||||
%bcond_with tensile_package
|
||||
|
||||
%define build_tensile_separately 1
|
||||
%else
|
||||
%define build_tensile_separately 0
|
||||
%endif
|
||||
|
||||
%global toolchain rocm
|
||||
# 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/')
|
||||
@@ -28,7 +37,7 @@
|
||||
%endif
|
||||
|
||||
%bcond_with test
|
||||
%if %{with test}
|
||||
%if %{with test} && %{without tensile_package}
|
||||
%global build_test ON
|
||||
%global __brp_check_rpaths %{nil}
|
||||
%else
|
||||
@@ -49,6 +58,20 @@
|
||||
%global build_tensile OFF
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel} || 0%{?sle_version} > 160000
|
||||
%bcond_with msgpack
|
||||
%else
|
||||
%bcond_without msgpack
|
||||
%endif
|
||||
|
||||
# Use ninja if it is available
|
||||
# Ninja is available on suse but obs times out with ninja build, make doesn't
|
||||
%if 0%{?fedora}
|
||||
%bcond_without ninja
|
||||
%else
|
||||
%bcond_with ninja
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel} && 0%{?rhel} < 10
|
||||
# On CS9: /usr/bin/debugedit: Cannot handle 8-byte build ID
|
||||
%global debug_package %{nil}
|
||||
@@ -67,14 +90,6 @@
|
||||
# OracleLinux 9 has a problem with it's strip not recognizing *.co's
|
||||
%global __strip %rocmllvm_bindir/llvm-strip
|
||||
|
||||
# Use ninja if it is available
|
||||
# Ninja is available on suse but obs times out with ninja build, make doesn't
|
||||
%if 0%{?fedora}
|
||||
%bcond_without ninja
|
||||
%else
|
||||
%bcond_with ninja
|
||||
%endif
|
||||
|
||||
%if %{with ninja}
|
||||
%global cmake_generator -G Ninja
|
||||
%else
|
||||
@@ -126,18 +141,34 @@
|
||||
# $ module purge
|
||||
%bcond_with gfx950
|
||||
|
||||
%if %{with gfx950} && %{with tensile_package}
|
||||
ExclusiveArch: do_not_build
|
||||
%endif
|
||||
|
||||
Name: %{rocblas_name}
|
||||
Version: %{rocm_version}
|
||||
Release: 8%{?dist}
|
||||
Release: 9%{?dist}
|
||||
Summary: BLAS implementation for ROCm
|
||||
Url: https://github.com/ROCmSoftwarePlatform/%{upstreamname}
|
||||
License: MIT AND BSD-3-Clause
|
||||
|
||||
Source0: %{url}/archive/refs/tags/rocm-%{rocm_version}.tar.gz#/%{upstreamname}-%{rocm_version}.tar.gz
|
||||
Source1: rocblas.rpmlintrc
|
||||
Patch2: 0001-fixup-install-of-tensile-output.patch
|
||||
Patch3: Modify-CMakeLists.txt-files-to-allow-to-build-modules-independently.patch
|
||||
Patch4: 0001-offload-compress-option.patch
|
||||
Patch6: 0001-option-to-disable-roctracer-logging.patch
|
||||
|
||||
%if 0%{build_tensile_separately}
|
||||
Requires: rocblas-tensile = %version
|
||||
%if %{with check}
|
||||
# If %check is enabled, we need to serialize the builds which will introduce
|
||||
# a circular dependency. The flag below causes OBS to ignore this.
|
||||
#
|
||||
#!BuildIgnore: %name
|
||||
BuildRequires: rocblas-tensile = %version
|
||||
%endif
|
||||
%endif
|
||||
BuildRequires: cmake
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: rocm-cmake
|
||||
@@ -150,26 +181,28 @@ BuildRequires: rocm-rpm-macros-modules
|
||||
|
||||
%if %{with tensile}
|
||||
%if 0%{?suse_version}
|
||||
BuildRequires: %{python_module tensile-devel}
|
||||
%if %{suse_version} < 1699
|
||||
BuildRequires: python3-tensile-devel
|
||||
BuildRequires: python3-joblib
|
||||
%else
|
||||
BuildRequires: python311-tensile-devel
|
||||
BuildRequires: %{python_module joblib}
|
||||
%endif # suse_version < 1699
|
||||
# OBS vm times out without console output
|
||||
%global tensile_verbose 2
|
||||
%global tensile_library_format yaml
|
||||
%else
|
||||
%{?with_msgpack:BuildRequires: msgpack-cxx-devel}
|
||||
%else # ?suse_version
|
||||
BuildRequires: python3dist(tensile)
|
||||
%if 0%{?rhel}
|
||||
%global tensile_verbose 2
|
||||
%global tensile_library_format yaml
|
||||
%else
|
||||
BuildRequires: msgpack-devel
|
||||
%{?with_msgpack:BuildRequires: msgpack-devel}
|
||||
%global tensile_verbose 1
|
||||
%global tensile_library_format msgpack
|
||||
%endif
|
||||
%endif # suse_version
|
||||
%if %{with msgpack}
|
||||
%global tensile_library_format msgpack
|
||||
%else
|
||||
%global tensile_library_format yaml
|
||||
%endif
|
||||
%else
|
||||
%global tensile_verbose %{nil}
|
||||
%global tensile_library_format %{nil}
|
||||
@@ -180,10 +213,13 @@ BuildRequires: pkgconfig(libzstd)
|
||||
%endif
|
||||
|
||||
%if %{with test}
|
||||
|
||||
%if 0%{?suse_version}
|
||||
BuildRequires: %{python_module PyYAML}
|
||||
%else
|
||||
BuildRequires: python3dist(pyyaml)
|
||||
%endif
|
||||
BuildRequires: blas-devel
|
||||
BuildRequires: libomp-devel
|
||||
BuildRequires: python3dist(pyyaml)
|
||||
BuildRequires: rocminfo
|
||||
BuildRequires: rocm-smi-devel
|
||||
BuildRequires: roctracer-devel
|
||||
@@ -230,9 +266,17 @@ Provides: rocblas-devel = %{version}-%{release}
|
||||
%description devel
|
||||
%{summary}
|
||||
|
||||
%package -n rocblas-tensile
|
||||
Summary: ROCBlas Tensile Modules
|
||||
Requires: %{name} = %version
|
||||
|
||||
%description -n rocblas-tensile
|
||||
BLAS architecture modules for all AMDGPU architectures
|
||||
|
||||
%if %{with test}
|
||||
%package test
|
||||
Summary: Tests for %{name}
|
||||
Requires: diffutils
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description test
|
||||
@@ -258,7 +302,7 @@ Conflicts: %{name}-devel
|
||||
%description gfx950-devel
|
||||
%{summary}
|
||||
|
||||
%if %{with test}
|
||||
%if %{with test} && %{without tensile_package}
|
||||
%package gfx950-test
|
||||
Summary: The gfx950 rocBLAS test package
|
||||
Requires: %{name}-gfx950%{?_isa} = %{version}-%{release}
|
||||
@@ -328,6 +372,11 @@ module load rocm/gfx950
|
||||
-DCMAKE_INSTALL_LIBDIR=${ROCM_LIB}
|
||||
|
||||
%else
|
||||
|
||||
%if %{build_tensile_separately} && %{without tensile_package}
|
||||
export TENSILE_SKIP_LIBRARY=true
|
||||
%endif
|
||||
|
||||
%cmake %{cmake_generator} %{cmake_config} \
|
||||
-DGPU_TARGETS=%{gpu_list} \
|
||||
-DBUILD_WITH_TENSILE=%{build_tensile} \
|
||||
@@ -335,19 +384,24 @@ module load rocm/gfx950
|
||||
|
||||
%endif
|
||||
|
||||
%cmake_build
|
||||
%cmake_build %{?with_tensile_package:TENSILE_LIBRARY_TARGET}
|
||||
%if %{with gfx950}
|
||||
module purge
|
||||
%endif
|
||||
|
||||
%install
|
||||
%if %{with tensile_package}
|
||||
DESTDIR=%{buildroot} /usr/bin/cmake -P build/library/src/TensileInstall/cmake_install.cmake
|
||||
%else
|
||||
%cmake_install
|
||||
|
||||
if [ -f %{buildroot}%{_prefix}/share/doc/rocblas/LICENSE.md ]; then
|
||||
rm %{buildroot}%{_prefix}/share/doc/rocblas/LICENSE.md
|
||||
fi
|
||||
%endif
|
||||
|
||||
%check
|
||||
%if %{without tensile_package}
|
||||
%if %{with test}
|
||||
%if %{with check}
|
||||
%if 0%{?suse_version}
|
||||
@@ -359,6 +413,7 @@ export LD_LIBRARY_PATH=%{_vpath_builddir}/library/src:$LD_LIBRARY_PATH
|
||||
%endif
|
||||
%endif
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if %{with gfx950}
|
||||
%files gfx950
|
||||
@@ -379,15 +434,18 @@ export LD_LIBRARY_PATH=%{_vpath_builddir}/library/src:$LD_LIBRARY_PATH
|
||||
|
||||
%else
|
||||
|
||||
%if %{without tensile_package}
|
||||
%files
|
||||
%license LICENSE.md
|
||||
%{_libdir}/librocblas.so.4{,.*}
|
||||
%if %{with tensile}
|
||||
%if ! %{build_tensile_separately}
|
||||
%dir %{_libdir}/rocblas
|
||||
%dir %{_libdir}/rocblas/library
|
||||
%{_libdir}/rocblas/library/Kernels*
|
||||
%{_libdir}/rocblas/library/Tensile*
|
||||
%endif
|
||||
%endif # with tensile
|
||||
|
||||
%files devel
|
||||
%doc README.md
|
||||
@@ -402,9 +460,28 @@ export LD_LIBRARY_PATH=%{_vpath_builddir}/library/src:$LD_LIBRARY_PATH
|
||||
%{_bindir}/rocblas*
|
||||
%endif
|
||||
|
||||
%else # ?tensile_package
|
||||
|
||||
%if %{with tensile}
|
||||
%files -n rocblas-tensile
|
||||
%dir %{_libdir}/rocblas
|
||||
%dir %{_libdir}/rocblas/library
|
||||
%{_libdir}/rocblas/library/Kernels*
|
||||
%{_libdir}/rocblas/library/Tensile*
|
||||
%endif
|
||||
|
||||
%endif # ?tensile_package
|
||||
%endif # gfx950
|
||||
|
||||
%changelog
|
||||
* Thu Jun 12 2025 Egbert Eich <eich@suse.com> - 6.4.0-9
|
||||
- Build and package core library and arch dependent
|
||||
tensile modules separately to parallelize the build.
|
||||
- Fix build and runtime dependencies of test package.
|
||||
- Restructure spec file (move bcond_with* settings to
|
||||
the top).
|
||||
- Add rpmlintrc for SUSE.
|
||||
|
||||
* Wed Jun 11 2025 Tom Rix <Tom.Rix@amd.com> - 6.4.0-8
|
||||
- Remove suse check for using ldconfig
|
||||
|
||||
|
Reference in New Issue
Block a user