7 Commits

Author SHA1 Message Date
117d2306b3 Add cblas-devel as build dependency on SUSE when test is enabled
Signed-off-by: Egbert Eich <eich@suse.com>
2025-08-15 17:23:01 +02:00
183a80bc53 Fix a number of dependencies on SUSE when test is enabled
The packages for blas, lapack, gcc fortran, gtest and gmock have
different names.

Signed-off-by: Egbert Eich <eich@suse.com>
2025-08-13 21:33:16 +02:00
ee4c31213a Restructure spec file to enhance readability
Signed-off-by: Egbert Eich <eich@suse.com>
2025-08-11 14:25:48 +02:00
9e529e3316 Fix build on SUSE
Signed-off-by: Egbert Eich <eich@suse.com>
2025-08-11 07:25:55 +02:00
57db823fd5 On SUSE check for msgpack-cxx instead of msgpack
Signed-off-by: Egbert Eich <eich@suse.com>
2025-08-11 07:25:52 +02:00
f886f224eb Enable Ninja on SUSE
Signed-off-by: Egbert Eich <eich@suse.com>
2025-08-11 07:25:25 +02:00
2dda88c61b On SLE-15 exclusively use python 3.6
This is since joblib is not even available on PackageHub.

Signed-off-by: Egbert Eich <eich@suse.com>
2025-08-11 07:25:12 +02:00

View File

@@ -4,10 +4,7 @@
%global hipblaslt_name hipblaslt
%endif
%if 0%{?suse_version}
%{?sle15_python_module_pythons}
%{?!python_module:%define python_module() python3-%{**}}
%else
%if 0%{!?suse_version:1}
%define python_exec python3
%define python_expand python3
%endif
@@ -57,21 +54,23 @@
# Use ninja if it is available
# Ninja is available on suse but obs times out with ninja build, make doesn't
%if 0%{?fedora}
%if 0%{?fedora} || 0%{?suse_version}
%bcond_without ninja
%else
%bcond_with ninja
%endif
%if %{with ninja}
%global cmake_generator -G Ninja
%if 0%{?suse_version}
%define __builder ninja
%else
%global cmake_generator %{nil}
%global cmake_generator -G Ninja
%endif
%endif
Name: %{hipblaslt_name}
Version: %{rocm_version}
Release: 1%{?dist}
Release: 4%{?dist}
Summary: ROCm general matrix operations beyond BLAS
Url: https://github.com/ROCmSoftwarePlatform/%{upstreamname}
License: MIT
@@ -112,39 +111,51 @@ BuildRequires: %{python_module msgpack}
BuildRequires: %{python_module PyYAML}
BuildRequires: %{python_module setuptools}
BuildRequires: msgpack-cxx-devel
%global tensile_verbose 2
%else
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}
%global tensile_verbose 2
%else
%global tensile_verbose 1
%if 0%{!?rhel: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}
%if 0%{?suse_version}
BuildRequires: blas-devel
BuildRequires: gcc-fortran
BuildRequires: gtest
BuildRequires: gmock
BuildRequires: lapack-devel
BuildRequires: cblas-devel
%else
BuildRequires: blas-static
BuildRequires: gcc-gfortran
BuildRequires: gtest-devel
BuildRequires: gmock-devel
BuildRequires: lapack-static
%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}
@@ -202,7 +213,8 @@ sed -i -e 's@set(CMAKE_INSTALL_LIBDIR@#set(CMAKE_INSTALL_LIBDIR@' CMakeLists.txt
sed -i -e 's@virtualenv_install@#virtualenv_install@' CMakeLists.txt
# do not mess with prefix path
sed -i -e 's@APPEND CMAKE_PREFIX_PATH@APPEND NO_CMAKE_PREFIX_PATH@' CMakeLists.txt
# Remove orjson from requirements list as fallbacks exist
%{?suse_version:sed -i -e '/orjson/d' tensilelite/requirements.txt}
# For debugging
# set threads to 1
# sed -i -e 's@default=-1@default=1@' tensilelite/Tensile/TensileCreateLibrary.py
@@ -216,15 +228,10 @@ sed -i -e 's@APPEND CMAKE_PREFIX_PATH@APPEND NO_CMAKE_PREFIX_PATH@' C
sed -i -e 's@-lgfortran -lflang -lflangrti@-lgfortran@' clients/gtest/CMakeLists.txt
%endif
%if 0%{?suse_version} >= 1600
%if 0%{?suse_version}
sed -i -e 's@msgpack REQUIRED@msgpack-cxx REQUIRED@' tensilelite/Tensile/Source/lib/CMakeLists.txt
%endif
%if 0%{?sle_version} == 150600
sed -i 's@#!/usr/bin/env python3@#!/usr/bin/python3.11@' tensilelite/Tensile/bin/Tensile*
sed -i 's@python3@python3.11@' clients/common/hipblaslt_gentest.py cmake/virtualenv.cmake tensilelite/Tensile/Ops/gen_assembly.sh
%endif
sed -i 's@find_package(LLVM REQUIRED CONFIG)@find_package(LLVM REQUIRED CONFIG PATHS "%{rocmllvm_cmakedir}")@' tensilelite/Tensile/Source/lib/CMakeLists.txt
# Reduce requirements
@@ -277,11 +284,12 @@ 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} \
-DBUILD_CLIENTS_TESTS=%{build_test} \
-DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF \
@@ -299,9 +307,6 @@ export Tensile_DIR=${TL}%{python3_sitelib}/Tensile
-DTensile_LIBRARY_FORMAT=msgpack \
-DTensile_VERBOSE=%{tensile_verbose} \
-DVIRTUALENV_BIN_DIR=%{_bindir} \
%if 0%{?sle_version} == 150600
-DPYTHON_EXECUTABLE:FILEPATH=python3.11 \
%endif
%{nil}
%cmake_build
@@ -336,6 +341,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.
* 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 10 2025 Egbert Eich <eich@suse.com> - 6.4.3-2
- 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.
* Thu Aug 7 2025 Tom Rix <Tom.Rix@amd.com> - 6.4.3-1
- Update to 6.4.3
- Add gfx1103,gfx1150,gfx1151 targets