## START: Set by rpmautospec ## (rpmautospec version 0.6.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; 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.1 %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: 1.1 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 Patch3: 0001-add-gfx1103-support-for-rocBLAS.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 gfx90a Summary: %{name} for MI200 %description gfx90a %{summary} %package gfx942 Summary: %{name} for MI300 %description gfx942 %{summary} %package gfx1100 Summary: %{name} for W7900 %description gfx1100 %{summary} %package gfx1103 Summary: %{name} for gfx1103 (experimental) %description gfx1103 %{summary} %package devel Summary: Libraries and headers for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}-gfx90a%{?_isa} = %{version}-%{release} Requires: %{name}-gfx942%{?_isa} = %{version}-%{release} Requires: %{name}-gfx1100%{?_isa} = %{version}-%{release} Requires: %{name}-gfx1103%{?_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{8,9,10,11}/lib/lib%{name}.so.* %if %{with tensile} %{_libdir}/rocblas/library/* %{_libdir}/rocm/gfx{8,9,10,11}/lib/rocblas/library/* %endif %files gfx90a %{_libdir}/rocm/gfx90a/lib/lib%{name}.so.* %if %{with tensile} %{_libdir}/rocm/gfx90a/lib/rocblas/library/* %endif %files gfx942 %{_libdir}/rocm/gfx942/lib/lib%{name}.so.* %if %{with tensile} %{_libdir}/rocm/gfx942/lib/rocblas/library/* %endif %files gfx1100 %{_libdir}/rocm/gfx1100/lib/lib%{name}.so.* %if %{with tensile} %{_libdir}/rocm/gfx1100/lib/rocblas/library/* %endif %files gfx1103 %{_libdir}/rocm/gfx1103/lib/lib%{name}.so.* %if %{with tensile} %{_libdir}/rocm/gfx1103/lib/rocblas/library/* %endif %files devel %doc README.md %dir %{_includedir}/%{name} %dir %{_libdir}/cmake/%{name} %{_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 * Thu Jun 06 2024 Jeremy Newton - 6.1.2-1 - Update to 6.1.2 * Sun May 19 2024 Tom Rix - 6.1.1-2 - Fix devel * Fri May 17 2024 Tom Rix - 6.1.1-1 - Update for 6.1.1 * Thu Apr 04 2024 Tom Rix - 6.0.2-4 - Add experimental build for gfx1103 * 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