Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8e03f87f63 | |||
| 53fde2bc35 | |||
| fbfc291884 | |||
| cb97d56afc | |||
| d7b6241c77 |
101
hipblaslt.spec
101
hipblaslt.spec
@@ -1,3 +1,24 @@
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
%if 0%{?suse_version}
|
||||
%global hipblaslt_name libhipblaslt0
|
||||
%else
|
||||
@@ -54,23 +75,21 @@
|
||||
|
||||
# Use ninja if it is available
|
||||
# Ninja is available on suse but obs times out with ninja build, make doesn't
|
||||
%if 0%{?fedora} || 0%{?suse_version}
|
||||
%if 0%{?fedora}
|
||||
%bcond_without ninja
|
||||
%else
|
||||
%bcond_with ninja
|
||||
%endif
|
||||
|
||||
%if %{with ninja}
|
||||
%if 0%{?suse_version}
|
||||
%define __builder ninja
|
||||
%else
|
||||
%global cmake_generator -G Ninja
|
||||
%endif
|
||||
%else
|
||||
%global cmake_generator %{nil}
|
||||
%endif
|
||||
|
||||
Name: %{hipblaslt_name}
|
||||
Version: %{rocm_version}
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
Summary: ROCm general matrix operations beyond BLAS
|
||||
Url: https://github.com/ROCmSoftwarePlatform/%{upstreamname}
|
||||
License: MIT
|
||||
@@ -100,7 +119,6 @@ BuildRequires: rocm-llvm-devel
|
||||
BuildRequires: rocm-runtime-devel
|
||||
BuildRequires: rocm-rpm-macros
|
||||
BuildRequires: rocm-smi-devel
|
||||
BuildRequires: roctracer-devel
|
||||
BuildRequires: zlib-devel
|
||||
|
||||
# For tensilelite
|
||||
@@ -111,51 +129,58 @@ BuildRequires: %{python_module msgpack}
|
||||
BuildRequires: %{python_module PyYAML}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: msgpack-cxx-devel
|
||||
%global tensile_verbose 2
|
||||
BuildRequires: %{python_module dataclasses if %python-base < 3.11}
|
||||
BuildRequires: %{python_module ujson}
|
||||
BuildRequires: %{python_module distro}
|
||||
BuildRequires: %{python_module simplejson}
|
||||
%{?with_ninja:BuildRequires: ninja}
|
||||
%else # %suse_version
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3dist(setuptools)
|
||||
BuildRequires: python3dist(pyyaml)
|
||||
%if 0%{!?rhel:1}
|
||||
%if 0%{?rhel}
|
||||
%global tensile_verbose 2
|
||||
%else
|
||||
%global tensile_verbose 1
|
||||
BuildRequires: python3dist(joblib)
|
||||
%endif
|
||||
# https://github.com/ROCm/hipBLASLt/issues/1734
|
||||
BuildRequires: python3dist(msgpack)
|
||||
BuildRequires: msgpack-devel
|
||||
%{?with_ninja:BuildRequires: ninja-build}
|
||||
%endif
|
||||
|
||||
%if %{with test}
|
||||
BuildRequires: rocm-omp-devel
|
||||
%if 0%{?suse_version}
|
||||
BuildRequires: blas-devel
|
||||
BuildRequires: gcc-fortran
|
||||
BuildRequires: gtest
|
||||
BuildRequires: gmock
|
||||
BuildRequires: lapack-devel
|
||||
BuildRequires: cblas-devel
|
||||
BuildRequires: gtest
|
||||
BuildRequires: openblas-devel
|
||||
%global blaslib openblas
|
||||
%else
|
||||
BuildRequires: gcc-gfortran
|
||||
BuildRequires: gmock-devel
|
||||
BuildRequires: gtest-devel
|
||||
%if 0%{?rhel}
|
||||
BuildRequires: flexiblas-devel
|
||||
%global blaslib flexiblas
|
||||
%else
|
||||
BuildRequires: blas-static
|
||||
BuildRequires: gcc-gfortran
|
||||
BuildRequires: gtest-devel
|
||||
BuildRequires: gmock-devel
|
||||
BuildRequires: lapack-static
|
||||
%global blaslib cblas
|
||||
%endif
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if %{with ninja}
|
||||
%if 0%{?fedora}
|
||||
BuildRequires: ninja-build
|
||||
%endif
|
||||
%if 0%{?suse_version}
|
||||
BuildRequires: ninja
|
||||
%define __builder ninja
|
||||
%endif
|
||||
%endif
|
||||
%if 0%{?rhel} || 0%{?suse_version}
|
||||
%global tensile_verbose 2
|
||||
%else
|
||||
%global tensile_verbose 1
|
||||
%endif
|
||||
|
||||
Provides: hipblaslt = %{version}-%{release}
|
||||
Provides: bundled(python-tensile) = %{tensile_version}
|
||||
@@ -229,7 +254,7 @@ sed -i -e 's@-lgfortran -lflang -lflangrti@-lgfortran@' c
|
||||
%endif
|
||||
|
||||
%if 0%{?suse_version}
|
||||
sed -i -e 's@msgpack REQUIRED@msgpack-cxx REQUIRED@' tensilelite/Tensile/Source/lib/CMakeLists.txt
|
||||
sed -i -e 's@\(.*find_package(msgpack \+REQUIRED\))@\1 NAMES msgpack msgpack-cxx msgpack-c)@' tensilelite/Tensile/Source/lib/CMakeLists.txt
|
||||
%endif
|
||||
|
||||
sed -i 's@find_package(LLVM REQUIRED CONFIG)@find_package(LLVM REQUIRED CONFIG PATHS "%{rocmllvm_cmakedir}")@' tensilelite/Tensile/Source/lib/CMakeLists.txt
|
||||
@@ -258,6 +283,13 @@ if [ "$GPUS" -lt "$HIP_JOBS" ]; then
|
||||
fi
|
||||
sed -i -e "s@--offload-arch@-parallel-jobs=${HIP_JOBS} --offload-arch@" library/src/amd_detail/rocblaslt/src/kernels/compile_code_object.sh
|
||||
|
||||
# change looking for cblas to blaslib
|
||||
sed -i -e 's@find_package( cblas REQUIRED CONFIG )@#find_package( cblas REQUIRED CONFIG )@' clients/CMakeLists.txt
|
||||
sed -i -e 's@set( BLAS_LIBRARY "blas" )@set( BLAS_LIBRARY "%blaslib" )@' clients/CMakeLists.txt
|
||||
%if ! 0%{?fedora}
|
||||
sed -i -e 's@lapack cblas@%blaslib@' clients/gtest/CMakeLists.txt
|
||||
%endif
|
||||
|
||||
%build
|
||||
|
||||
# Do a manual install instead of cmake's virtualenv
|
||||
@@ -284,13 +316,14 @@ export PATH=${TL}/%{_bindir}:$PATH
|
||||
export PYTHONPATH=${TL}%{python3_sitelib}:$PYTHONPATH
|
||||
export Tensile_DIR=${TL}%{python3_sitelib}/Tensile
|
||||
%endif
|
||||
%{?suse_version:export LLVM_DIR=%{rocmllvm_cmakedir}}
|
||||
# Uncomment and see if the path is sane
|
||||
# TensileGetPath
|
||||
|
||||
# Use ld.lld to work around a problem with ld
|
||||
%cmake %{?cmake_generator} \
|
||||
%cmake %{cmake_generator} \
|
||||
-DAMDGPU_TARGETS=%{amdgpu_targets} \
|
||||
-DBLAS_INCLUDE_DIR=%{_includedir}/%{blaslib} \
|
||||
-DBLAS_LIBRARY=%{blaslib} \
|
||||
-DBUILD_CLIENTS_TESTS=%{build_test} \
|
||||
-DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF \
|
||||
-DBUILD_VERBOSE=ON \
|
||||
@@ -301,6 +334,7 @@ export Tensile_DIR=${TL}%{python3_sitelib}/Tensile
|
||||
-DCMAKE_CXX_FLAGS="-fuse-ld=%{rocmllvm_bindir}/ld.lld" \
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON \
|
||||
-DHIP_PLATFORM=amd \
|
||||
-DHIPBLASLT_ENABLE_MARKER=OFF \
|
||||
-DROCM_SYMLINK_LIBS=OFF \
|
||||
-DBUILD_WITH_TENSILE=ON \
|
||||
-DTensile_COMPILER=%{rocmllvm_bindir}/clang++ \
|
||||
@@ -341,19 +375,20 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Aug 15 2025 Egbert Eich <eich@suse.com> - 6.4.3-4
|
||||
- Add cblas-devel as build requires on SUSE when test is enabled.
|
||||
* Thu Aug 28 2025 Tom Rix <Tom.Rix@amd.com> - 6.4.3-5
|
||||
- Add Fedora copyright
|
||||
|
||||
* Wed Aug 13 2025 Egbert Eich <eich@suse.com> - 6.4.3-3
|
||||
- Fix a number of dependencies on SUSE when test is enabled.
|
||||
* Sun Aug 24 2025 Egbert Eich <eich@suse.com> - 6.4.3-4
|
||||
- On SUSE use code from python-tensile to check for msgpack.
|
||||
|
||||
* Sun Aug 10 2025 Egbert Eich <eich@suse.com> - 6.4.3-2
|
||||
* Wed Aug 20 2025 Egbert Eich <eich@suse.com> - 6.4.3-3
|
||||
- On SLE-15 exclusively use python 3.6.
|
||||
This is since joblib is not even available on PackageHub.
|
||||
- Enable Ninja on SUSE.
|
||||
- On SUSE check for msgpack-cxx instead of msgpack.
|
||||
- Fix build on SUSE.
|
||||
- Restructure to enhance readability.
|
||||
|
||||
* Wed Aug 13 2025 Tom Rix <Tom.Rix@amd.com> - 6.4.3-2
|
||||
- Remove roctracer
|
||||
- Build on EPEL
|
||||
|
||||
* Thu Aug 7 2025 Tom Rix <Tom.Rix@amd.com> - 6.4.3-1
|
||||
- Update to 6.4.3
|
||||
|
||||
Reference in New Issue
Block a user