5 Commits

Author SHA1 Message Date
8e03f87f63 Add Fedora copyright
Signed-off-by: Tom Rix <Tom.Rix@amd.com>
2025-08-28 07:40:16 -07:00
53fde2bc35 On SUSE use code from python-tensile to check for msgpack
Signed-off-by: Egbert Eich <eich@suse.com>
2025-08-24 12:33:31 +02:00
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

@@ -1,13 +1,31 @@
#
# 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
%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 +89,7 @@
Name: %{hipblaslt_name}
Version: %{rocm_version}
Release: 1%{?dist}
Release: 5%{?dist}
Summary: ROCm general matrix operations beyond BLAS
Url: https://github.com/ROCmSoftwarePlatform/%{upstreamname}
License: MIT
@@ -101,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
@@ -113,7 +130,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 +150,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 +238,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,13 +253,8 @@ 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
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
%if 0%{?suse_version}
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
@@ -251,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
@@ -283,6 +322,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 +334,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 +375,21 @@ fi
%endif
%changelog
* Thu Aug 28 2025 Tom Rix <Tom.Rix@amd.com> - 6.4.3-5
- Add Fedora copyright
* Sun Aug 24 2025 Egbert Eich <eich@suse.com> - 6.4.3-4
- On SUSE use code from python-tensile to check for msgpack.
* 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