%global upstreamname Tensile %global rocm_release 5.6 %global rocm_patch 0 %global rocm_version %{rocm_release}.%{rocm_patch} # This doesn't work quite yet: %bcond_with check Name: python-tensile Version: %{rocm_version} Release: 1%{?dist} Summary: Tool for creating benchmark-driven backend libraries for GEMMs Url: https://github.com/ROCmSoftwarePlatform/Tensile License: MIT and BSD Source0: %{url}/archive/refs/tags/rocm-%{version}.tar.gz#/%{upstreamname}-%{version}.tar.gz BuildRequires: python3-devel %if %{with check} # Some of these might not be needed BuildRequires: compiler-rt BuildRequires: clang-devel BuildRequires: lld BuildRequires: llvm-devel BuildRequires: rocm-cmake BuildRequires: rocm-comgr-devel BuildRequires: rocm-hip-devel BuildRequires: rocm-runtime-devel %endif BuildArch: noarch %description Tensile is a tool for creating benchmark-driven backend libraries for GEMMs, GEMM-like problems (such as batched GEMM), and general N-dimensional tensor contractions on a GPU. The Tensile library is mainly used as backend library to rocBLAS. Tensile acts as the performance backbone for a wide variety of 'compute' applications running on AMD GPUs. %package -n python3-tensile Summary: %{summary} %description -n python3-tensile Tensile is a tool for creating benchmark-driven backend libraries for GEMMs, GEMM-like problems (such as batched GEMM), and general N-dimensional tensor contractions on a GPU. The Tensile library is mainly used as backend library to rocBLAS. Tensile acts as the performance backbone for a wide variety of 'compute' applications running on AMD GPUs. %package -n python3-tensile-devel Summary: The python3-tensile development package Requires: %{name} = %{version}-%{release} %description -n python3-tensile-devel The python3-tensile development package. %prep %autosetup -p1 -n %{upstreamname}-rocm-%{version} #Fix a few things: chmod 755 Tensile/Configs/miopen/convert_cfg.py %py3_shebang_fix Tensile/Configs/miopen/convert_cfg.py %py3_shebang_fix Tensile/Tests/create_tests.py # I'm assuming we don't need these: rm -r %{upstreamname}/Configs/miopen/archives %generate_buildrequires %pyproject_buildrequires -t %build %pyproject_wheel %install %pyproject_install %pyproject_save_files %{upstreamname} #FIXME: tensile installs some cmake modules incorrectly: mkdir -p %{buildroot}%{_datadir} mv %{buildroot}%{_prefix}/cmake %{buildroot}%{_datadir}/cmake %check %if %{with check} %tox %endif %files -n python3-tensile -f %{pyproject_files} %doc README.md %license LICENSE.md %{_bindir}/%{upstreamname}* %{_bindir}/tensile* %exclude %{python3_sitelib}/%{upstreamname}/Source %exclude %{python3_sitelib}/%{upstreamname}/Tests %files -n python3-tensile-devel %doc README.md %license LICENSE.md %{_datadir}/cmake/%{upstreamname}*.cmake %{python3_sitelib}/%{upstreamname}/Source %{python3_sitelib}/%{upstreamname}/Tests %changelog * Fri Jun 30 2023 Jeremy Newton - 5.6.0-1 - Initial package