Projects
Factory:RISC-V:ROCm
hipblas
_service:tar_scm:hipblas.spec
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:hipblas.spec of Package hipblas
%global upstreamname hipBLAS %global rocm_release 6.2 %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} %bcond_with debug %if %{with debug} %global build_type DEBUG %else %global build_type RelWithDebInfo %endif %bcond_with test %if %{with test} %global build_test ON %global __brp_check_rpaths %{nil} # test parallel building broken %global _smp_mflags -j1 %else %global build_test OFF %endif # gfortran and clang rpm macros do not mix %global build_fflags %{nil} Name: hipblas Version: %{rocm_version} Release: 1 Summary: ROCm BLAS marshalling library Url: https://github.com/ROCmSoftwarePlatform/%{upstreamname} License: MIT Source0: %{url}/archive/refs/tags/rocm-%{rocm_version}.tar.gz#/%{upstreamname}-%{rocm_version}.tar.gz BuildRequires: cmake BuildRequires: git BuildRequires: gcc-gfortran BuildRequires: ninja-build BuildRequires: rocblas-devel BuildRequires: rocm-cmake BuildRequires: rocm-comgr-devel BuildRequires: rocm-hip-devel BuildRequires: rocm-runtime-devel BuildRequires: rocm-rpm-macros BuildRequires: rocm-rpm-macros-modules BuildRequires: rocsolver-devel %if %{with test} BuildRequires: blas-static BuildRequires: gtest-devel BuildRequires: lapack-static BuildRequires: python3-pyyaml %endif #Use compat if LLVM is not latest, 1 is enable %global compat_build 1 %global maj_ver 18 %if %{compat_build} BuildRequires: llvm%{maj_ver}-devel BuildRequires: llvm%{maj_ver}-test BuildRequires: llvm%{maj_ver}-cmake-utils BuildRequires: llvm%{maj_ver}-libs BuildRequires: lld%{maj_ver} BuildRequires: lld%{maj_ver}-devel BuildRequires: clang%{maj_ver}-devel BuildRequires: clang%{maj_ver}-libs BuildRequires: clang%{maj_ver}-tools-extra %else BuildRequires: llvm-devel = %{version} BuildRequires: llvm-test = %{version} BuildRequires: llvm-cmake-utils = %{version} %endif Requires: rocm-rpm-macros-modules # Only x86_64 works right now: ExclusiveArch: x86_64 riscv64 %description hipBLAS is a Basic Linear Algebra Subprograms (BLAS) marshalling library, with multiple supported backends. It sits between the application and a 'worker' BLAS library, marshalling inputs into the backend library and marshalling results back to the application. hipBLAS exports an interface that does not require the client to change, regardless of the chosen backend. Currently, hipBLAS supports rocBLAS and cuBLAS as backends. %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 for gpu in %{rocm_gpu_list} do module load rocm/$gpu mkdir %{_target_platform}-$gpu pushd %{_target_platform}-$gpu %cmake .. -G Ninja \ -DCMAKE_BUILD_TYPE=%build_type \ -DCMAKE_SKIP_RPATH=ON \ -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 \ -DBUILD_CLIENTS_BENCHMARKS=%{build_test} \ -DBUILD_CLIENTS_TESTS=%{build_test} \ -DBUILD_CLIENTS_TESTS_OPENMP=OFF \ -DBUILD_FORTRAN_CLIENTS=OFF \ %if %{compat_build} -DCMAKE_CXX_FLAGS="--rocm-device-lib-path=%{_prefix}/lib/clang/%{maj_ver}/amdgcn/bitcode" \ %endif -DBLAS_LIBRARY=cblas popd cmake --build %{_target_platform}-$gpu %{?_smp_mflags} --verbose module purge done %install for gpu in %{rocm_gpu_list} do DESTDIR=%{buildroot} cmake --install %{_target_platform}-$gpu done echo s@%{buildroot}@@ > br.sed find %{buildroot}%{_libdir} -name '*.so.*.[0-9]' | sed -f br.sed > %{name}.files find %{buildroot}%{_libdir} -name '*.so.[0-9]' | sed -f br.sed >> %{name}.files find %{buildroot}%{_libdir} -name '*.so' | sed -f br.sed > %{name}.devel find %{buildroot}%{_libdir} -name '*.cmake' | sed -f br.sed >> %{name}.devel find %{buildroot} -name '%{name}*' | sed -f br.sed > %{name}.test %files -f %{name}.files %license LICENSE.md %exclude %{_docdir}/%{name}/LICENSE.md %files devel -f %{name}.devel %doc README.md %{_includedir}/%{name} %if %{with test} %files test -f %{name}.test %endif %changelog * Tue Oct 29 2024 misaka00251 <liuxin@iscasc.ac.cn> - 6.2.2-1 - Init package
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2