## START: Set by rpmautospec ## (rpmautospec version 0.6.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 3; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global upstreamname rocBLAS %global rocm_release 6.0 %global rocm_patch 2 %global rocm_version %{rocm_release}.%{rocm_patch} %global toolchain rocm # hipcc does not support some clang flags %global build_cxxflags %(echo %{optflags} | sed -e 's/-fstack-protector-strong/-Xarch_host -fstack-protector-strong/' -e 's/-fcf-protection/-Xarch_host -fcf-protection/') # $gpu will be evaluated in the loops below %global _vpath_builddir %{_vendor}-%{_target_os}-build-${gpu} # It is necessary to use this with a local build # export QA_RPATHS=0xff %bcond_with test # Disable to get llvm17 fixed %bcond_without tensile Name: rocblas Version: %{rocm_version} Release: %autorelease Summary: BLAS implementation for ROCm Url: https://github.com/ROCmSoftwarePlatform/%{upstreamname} License: MIT AND BSD-3-Clause Source0: %{url}/archive/refs/tags/rocm-%{rocm_version}.tar.gz#/%{upstreamname}-%{rocm_version}.tar.gz Patch0: 0001-prepare-rocblas-cmake-for-fedora.patch Patch1: 0001-Hardcode-cblas-as-the-blas-library.patch Patch2: 0001-fixup-install-of-tensile-output.patch BuildRequires: cmake BuildRequires: ninja-build BuildRequires: rocm-cmake BuildRequires: rocm-comgr-devel BuildRequires: rocm-hip-devel BuildRequires: rocm-runtime-devel BuildRequires: rocm-rpm-macros BuildRequires: rocm-rpm-macros-modules %if %{with tensile} BuildRequires: msgpack-devel BuildRequires: python-tensile %endif %if %{with test} BuildRequires: gtest-devel BuildRequires: blas-devel BuildRequires: libomp-devel BuildRequires: python3-pyyaml BuildRequires: rocminfo %endif Requires: rocm-rpm-macros-modules # Only x86_64 works right now: ExclusiveArch: x86_64 %description rocBLAS is the AMD library for Basic Linear Algebra Subprograms (BLAS) on the ROCm platform. It is implemented in the HIP programming language and optimized for AMD GPUs. %package devel Summary: Libraries and headers for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel %{summary} %if %{with test} %package test Summary: Tests for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description test %{summary} %endif %prep %autosetup -p1 -n %{upstreamname}-rocm-%{version} %build # With compat llvm the system clang is wrong CLANG_PATH=`hipconfig --hipclangpath` export TENSILE_ROCM_ASSEMBLER_PATH=${CLANG_PATH}/clang++ export TENSILE_ROCM_OFFLOAD_BUNDLER_PATH=${CLANG_PATH}/clang-offload-bundler # Work around problem with koji's ld export HIPCC_LINK_FLAGS_APPEND=-fuse-ld=lld for gpu in %{rocm_gpu_list} do module load rocm/$gpu %cmake -G Ninja \ -DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF \ -DROCM_SYMLINK_LIBS=OFF \ -DHIP_PLATFORM=amd \ -DAMDGPU_TARGETS=${ROCM_GPUS} \ -DCMAKE_INSTALL_LIBDIR=$ROCM_LIB \ -DCMAKE_INSTALL_BINDIR=$ROCM_BIN \ %if %{with test} %rocm_cmake_test_options \ %endif %if %{with tensile} -DBUILD_WITH_TENSILE=ON \ -DBUILD_WITH_PIP=OFF %else -DBUILD_WITH_TENSILE=OFF %endif %cmake_build module purge done %install for gpu in %{rocm_gpu_list} do %cmake_install done %files %dir %{_libdir}/cmake/%{name}/ %license LICENSE.md %exclude %{_docdir}/%{name}/LICENSE.md %{_libdir}/lib%{name}.so.* %{_libdir}/rocm/gfx*/lib/lib%{name}.so.* %if %{with tensile} %{_libdir}/rocblas/library/* %{_libdir}/rocm/gfx*/lib/rocblas/library/* %endif %files devel %doc README.md %{_includedir}/%{name} %{_libdir}/cmake/%{name}/ %{_libdir}/lib%{name}.so %{_libdir}/rocm/gfx*/lib/lib%{name}.so %{_libdir}/rocm/gfx*/lib/cmake/%{name}/ %if %{with test} %files test %{_bindir}/%{name}* %{_libdir}/rocm/gfx*/bin/%{name}* %endif %changelog ## START: Generated by rpmautospec * Sat Mar 16 2024 Tom Rix - 6.0.2-3 - Work around a problem with koji's ld * Sat Mar 16 2024 Tom Rix - 6.0.2-2 - Workaround tensile problem * Sun Mar 10 2024 Tom Rix - 6.0.2-1 - Update to 6.0.2 * Fri Jan 26 2024 Fedora Release Engineering - 6.0.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sat Jan 20 2024 Tom Rix - 6.0.0-2 - Enable tensile option * Wed Dec 20 2023 Jeremy Newton - 6.0.0-1 - Update to 6.0 * Sun Oct 22 2023 Tom Rix - 5.7.1-3 - Change url - capitalize AND * Sat Oct 21 2023 Tom Rix - 5.7.1-2 - Fix so location - glob gpu family location * Sun Oct 15 2023 Tom Rix - 5.7.1-1 - Update to 5.7.1 - Use rocm-rpm-macros * Sat Oct 7 2023 Tom Rix - 5.7.0-1 - Update to 5.7 - Use WIP rocm-rpm-macros - Convert to environent modules * Sun Oct 1 2023 Tom Rix - 5.6.0-2 - Split the build into gpu families * Sat Sep 23 2023 Tom Rix - 5.6.0-1 - Update to 5.6 * Tue Jun 6 2023 Tom Rix - 5.5.1-1 - Initial package ## END: Generated by rpmautospec