forked from ROCm/hipblaslt
Compare commits
1 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 96097bcb02 |
@@ -1,18 +1,15 @@
|
||||
%if 0%{?suse_version}
|
||||
%global hipblaslt_name libhipblaslt0
|
||||
%else
|
||||
%global hipblaslt_name hipblaslt
|
||||
%endif
|
||||
%{rocm_set_libpackage_name hipblaslt -s 0}
|
||||
|
||||
%{!?python_exec: %define python_exec python3}
|
||||
%if 0%{?python_flavor:1}
|
||||
%define rocm_python_bin %{expand:%{__%python_flavor}}
|
||||
%else
|
||||
%if 0%{!?suse_version:1}
|
||||
%define python_exec python3
|
||||
%define python_expand python3
|
||||
%define rocm_python_bin python3
|
||||
%endif
|
||||
|
||||
%if 0%{?sle_version} > 160000
|
||||
ExclusiveArch: do_not_build
|
||||
%else
|
||||
%bcond_without msgpack
|
||||
%endif
|
||||
|
||||
%global upstreamname hipBLASLt
|
||||
@@ -111,30 +108,30 @@ BuildRequires: zlib-devel
|
||||
%if 0%{?suse_version}
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: %{python_module joblib}
|
||||
BuildRequires: %{python_module msgpack}
|
||||
%{?with_msgpack: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_msgpack:BuildRequires: msgpack-cxx-devel}
|
||||
%{?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}
|
||||
BuildRequires: python3dist(joblib)
|
||||
%endif
|
||||
# https://github.com/ROCm/hipBLASLt/issues/1734
|
||||
%if %{with msgpack}
|
||||
BuildRequires: python3dist(msgpack)
|
||||
BuildRequires: msgpack-devel
|
||||
%endif
|
||||
%{?with_ninja:BuildRequires: ninja-build}
|
||||
%endif
|
||||
%rocm_set_tensile
|
||||
|
||||
%if %{with test}
|
||||
BuildRequires: blas-static
|
||||
@@ -144,15 +141,7 @@ BuildRequires: gmock-devel
|
||||
BuildRequires: lapack-static
|
||||
%endif
|
||||
|
||||
%if %{with ninja}
|
||||
%if 0%{?fedora}
|
||||
BuildRequires: ninja-build
|
||||
%endif
|
||||
%if 0%{?suse_version}
|
||||
BuildRequires: ninja
|
||||
%define __builder ninja
|
||||
%endif
|
||||
%endif
|
||||
%rocm_set_ninja
|
||||
|
||||
Provides: hipblaslt = %{version}-%{release}
|
||||
Provides: bundled(python-tensile) = %{tensile_version}
|
||||
@@ -245,7 +234,7 @@ sed -i -e '/joblib/d' tensilelite/requirements.*
|
||||
cd tensilelite
|
||||
TL=$PWD
|
||||
|
||||
%{python_exec} setup.py install --root $TL
|
||||
%python_exec setup.py install --root $TL
|
||||
cd ..
|
||||
|
||||
# Should not have to do this
|
||||
@@ -258,8 +247,13 @@ export TENSILE_ROCM_OFFLOAD_BUNDLER_PATH=${CLANG_PATH}/clang-offload-bundler
|
||||
|
||||
# Look for the just built tensilelite
|
||||
export PATH=${TL}/%{_bindir}:$PATH
|
||||
%{?python_expand} export PYTHONPATH=${TL}%{python3_sitelib}:$PYTHONPATH
|
||||
%{?python_expand} export Tensile_DIR=${TL}%{python3_sitelib}/Tensile
|
||||
%if 0%{?suse_version}
|
||||
%{python_expand} export PYTHONPATH=${TL}%{python_sitelib}:$PYTHONPATH
|
||||
%{python_expand} export Tensile_DIR=${TL}%{python_sitelib}/Tensile
|
||||
%else
|
||||
export PYTHONPATH=${TL}%{python3_sitelib}:$PYTHONPATH
|
||||
export Tensile_DIR=${TL}%{python3_sitelib}/Tensile
|
||||
%endif
|
||||
export LLVM_DIR=%{rocmllvm_cmakedir}
|
||||
# Uncomment and see if the path is sane
|
||||
# TensileGetPath
|
||||
@@ -280,7 +274,7 @@ export LLVM_DIR=%{rocmllvm_cmakedir}
|
||||
-DROCM_SYMLINK_LIBS=OFF \
|
||||
-DBUILD_WITH_TENSILE=ON \
|
||||
-DTensile_COMPILER=%{rocmllvm_bindir}/clang++ \
|
||||
-DTensile_LIBRARY_FORMAT=msgpack \
|
||||
-DTensile_LIBRARY_FORMAT=%{tensile_library_format} \
|
||||
-DTensile_VERBOSE=%{tensile_verbose} \
|
||||
-DVIRTUALENV_BIN_DIR=%{_bindir} \
|
||||
%{?rocm_python_bin:-DPYTHON_EXECUTABLE:FILEPATH=%{basename:%rocm_python_bin}} \
|
||||
@@ -319,6 +313,7 @@ fi
|
||||
|
||||
%changelog
|
||||
* Tue Jun 17 2025 Egbert Eich <eich@suse.com> - 6.4.1-5
|
||||
- Use distro specific macros to hide some distribution differences.
|
||||
- On SLE-15 exclusively use python 3.6
|
||||
This is since joblib is not even available on PackageHub
|
||||
- Improve tensile format handling - currently, YAML is not
|
||||
|
||||
Reference in New Issue
Block a user