-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpython-tensile.spec
More file actions
75 lines (67 loc) · 2.43 KB
/
Copy pathpython-tensile.spec
File metadata and controls
75 lines (67 loc) · 2.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Tensile GEMM auto-tuner generator (TheRock 10.0)
# Pure Python + C++ sources used at consumer build time (rocBLAS). No prebuilt kernels.
Name: python-tensile
Version: 10.0.0
Release: 1
Summary: ROCm Tensile GEMM kernel generator
License: MIT
Group: Development/Python
URL: https://github.com/ROCm/Tensile
Source0: https://github.com/ROCm/rocm-libraries/releases/download/therock-10.0/tensile.tar.gz#/tensile-%{version}.tar.gz
# Make find_package(Tensile) work with system PATH layout
Patch0: 0001-tensile-config-system-paths.patch
# LLVM 23 true16: GFX11+ f16 cvt needs .l/.h selectors
Patch1: 0002-true16-f16-cvt-llvm23.patch
BuildArch: noarch
BuildRequires: python%{pyver}dist(setuptools)
BuildRequires: python%{pyver}dist(pip)
BuildRequires: python3-devel
Requires: python%{pyver}dist(pyyaml)
Requires: python%{pyver}dist(msgpack)
Requires: python%{pyver}dist(joblib)
Requires: python%{pyver}dist(rich)
Provides: python3-tensile = %{EVRD}
Provides: tensile = %{EVRD}
Provides: cmake(Tensile) = 4.47.0
%description
Tensile generates optimized GEMM and tensor-contraction kernels for AMD GPUs.
This package ships the pure-Python generator and C++ host library sources used
at build time by rocBLAS. No prebuilt code objects are included.
%prep
%autosetup -n tensile -p1
%build
%py3_build
%install
%py3_install
# CMake package for find_package(Tensile) — setuptools data_files land poorly under FHS
# Use share/cmake so a noarch package is multi-lib friendly
mkdir -p %{buildroot}%{_datadir}/cmake/Tensile
install -m 644 Tensile/cmake/TensileConfig.cmake \
Tensile/cmake/TensileConfigVersion.cmake \
%{buildroot}%{_datadir}/cmake/Tensile/
# Drop non-FHS cmake install from setuptools data_files
rm -rf %{buildroot}/usr/cmake
# Ensure console scripts are present (setuptools entry_points)
if [ ! -x %{buildroot}%{_bindir}/TensileGetPath ]; then
mkdir -p %{buildroot}%{_bindir}
cat > %{buildroot}%{_bindir}/TensileGetPath <<'PY'
#!/usr/bin/python
from Tensile import PrintTensileRoot
PrintTensileRoot()
PY
chmod 755 %{buildroot}%{_bindir}/TensileGetPath
fi
%files
%license LICENSE.md
%doc README.md CHANGELOG.md
%{python3_sitelib}/Tensile/
%{python3_sitelib}/Tensile-*.egg-info/
%{_bindir}/Tensile
%{_bindir}/TensileCreateLibrary
%{_bindir}/TensileGetPath
%{_bindir}/tensileBenchmarkLibraryClient
%{_bindir}/TensileBenchmarkCluster
%{_bindir}/TensileRetuneLibrary
%{_datadir}/cmake/Tensile/
# setuptools also drops a non-FHS /usr/cmake copy — drop it
%exclude /usr/cmake