1 # Maintainer: Torsten Keßler <tpkessler at archlinux dot org>
6 pkgdesc='Subset of LAPACK functionality on the ROCm platform'
8 url='https://rocsolver.readthedocs.io/en/latest/'
9 license=('BSD 2-Clause')
10 depends=('hip' 'rocblas')
11 makedepends=('rocm-cmake' 'python-pyaml' 'fmt')
12 _git='https://github.com/ROCmSoftwarePlatform/rocSOLVER'
13 source=("$pkgname-$pkgver.tar.gz::$_git/archive/rocm-$pkgver.tar.gz")
14 sha256sums=('6775aa5b96731208c12c5b450cf218d4c262a80b7ea20c2c3034c448bb2ca4d2')
16 _dirname="$(basename "$_git")-$(basename "${source[0]}" .tar.gz)"
19 # Compile source code for supported GPU archs in parallel
20 export HIPCC_COMPILE_FLAGS_APPEND="-parallel-jobs=$(nproc)"
21 export HIPCC_LINK_FLAGS_APPEND="-parallel-jobs=$(nproc)"
22 # -fcf-protection is not supported by HIP, see
23 # https://docs.amd.com/bundle/ROCm-Compiler-Reference-Guide-v5.5/page/Compiler_Options_and_Features.html#d2e2018
24 CXXFLAGS="${CXXFLAGS} -fcf-protection=none" \
29 -DCMAKE_BUILD_TYPE=None \
30 -DCMAKE_CXX_COMPILER=/opt/rocm/bin/hipcc \
31 -DCMAKE_INSTALL_PREFIX=/opt/rocm \
32 -DROCSOLVER_EMBED_FMT=ON
37 DESTDIR="$pkgdir" cmake --install build
39 echo "/opt/rocm/$pkgname/lib" > "$pkgname.conf"
40 install -Dm644 "$pkgname.conf" "$pkgdir/etc/ld.so.conf.d/$pkgname.conf"
42 install -Dm644 "$_dirname/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"