3 Commits

Author SHA1 Message Date
fbfc291884 On SUSE check for msgpack-cxx instead of msgpack
Signed-off-by: Egbert Eich <eich@suse.com>
2025-08-20 19:57:32 +02:00
cb97d56afc 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-20 19:51:07 +02:00
d7b6241c77 Remove roctracer build requires
Build on EPEL

Signed-off-by: Tom Rix <Tom.Rix@amd.com>
2025-08-14 08:46:53 -07: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
@@ -71,7 +68,7 @@
Name: %{hipblaslt_name}
Version: %{rocm_version}
Release: 1%{?dist}
Release: 3%{?dist}
Summary: ROCm general matrix operations beyond BLAS
Url: https://github.com/ROCmSoftwarePlatform/%{upstreamname}
License: MIT
@@ -101,7 +98,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
@@ -113,7 +109,11 @@ 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}
%else # %suse_version
BuildRequires: python3-devel
BuildRequires: python3dist(setuptools)
BuildRequires: python3dist(pyyaml)
@@ -129,11 +129,26 @@ BuildRequires: msgpack-devel
%endif
%if %{with test}
BuildRequires: blas-static
BuildRequires: rocm-omp-devel
%if 0%{?suse_version}
BuildRequires: gcc-fortran
BuildRequires: gmock
BuildRequires: gtest
BuildRequires: openblas-devel
%global blaslib openblas
%else
BuildRequires: gcc-gfortran
BuildRequires: gtest-devel
BuildRequires: gmock-devel
BuildRequires: gtest-devel
%if 0%{?rhel}
BuildRequires: flexiblas-devel
%global blaslib flexiblas
%else
BuildRequires: blas-static
BuildRequires: lapack-static
%global blaslib cblas
%endif
%endif
%endif
%if %{with ninja}
@@ -202,7 +217,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 +232,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
@@ -251,6 +262,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
@@ -283,6 +301,8 @@ export Tensile_DIR=${TL}%{python3_sitelib}/Tensile
# Use ld.lld to work around a problem with ld
%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 \
@@ -293,15 +313,13 @@ 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++ \
-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 +354,15 @@ fi
%endif
%changelog
* 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.
- On SUSE check for msgpack-cxx instead of msgpack.
* 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
- Add gfx1103,gfx1150,gfx1151 targets