diff options
author | Torsten Keßler | 2022-10-12 15:06:13 +0200 |
---|---|---|
committer | Torsten Keßler | 2022-10-12 15:07:58 +0200 |
commit | 5174e5ba7e9fc6250192596c83be68420352e972 (patch) | |
tree | 5cb0cdbc75d1a49bc5d1bc417163c27d1589fe75 /PKGBUILD | |
parent | fac8f418fd1ab8bda195d8bf4cfcbbbd3f5bab07 (diff) | |
download | aur-5174e5ba7e9fc6250192596c83be68420352e972.tar.gz |
upgpkg: rocblas 5.3.0-1
* Follow cmake template from wiki
* Remove AMDGPU_TARGETS logic; use all available targets
* Update checksum and link to documentation
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 63 |
1 files changed, 24 insertions, 39 deletions
@@ -1,62 +1,47 @@ # Maintainer: Torsten Keßler <t dot kessler at posteo dot de> # Contributor: Markus Näther <naether.markus@gmail.com> pkgname=rocblas -pkgver=5.2.3 +pkgver=5.3.0 pkgrel=1 pkgdesc='Next generation BLAS implementation for ROCm platform' arch=('x86_64') url='https://rocblas.readthedocs.io/en/latest' license=('MIT') depends=('hip' 'openmp') -makedepends=('cmake' 'git' 'python' 'python-pip' 'python-virtualenv' 'python-pyaml' - 'perl-file-which' 'msgpack-c' 'rocm-cmake' 'gcc-fortran') +makedepends=('rocm-cmake' 'git' 'python' 'python-pip' 'python-virtualenv' 'python-pyaml' + 'perl-file-which' 'msgpack-c' 'gcc-fortran') _rocblas='https://github.com/ROCmSoftwarePlatform/rocBLAS' -source=("$pkgname-$pkgver.tar.gz::$_rocblas/archive/rocm-$pkgver.tar.gz" - "include-path.patch::https://github.com/ROCmSoftwarePlatform/rocBLAS/commit/992429ff1d04195b10f9a3350668e180b34dbdb5.patch") -sha256sums=('36f74ce53b82331a756c42f95f3138498d6f4a66f2fd370cff9ab18281bb12d5' - 'SKIP') +source=("$pkgname-$pkgver.tar.gz::$_rocblas/archive/rocm-$pkgver.tar.gz") +sha256sums=('8ea7269604cba949a6ea84b78dc92a44fa890427db88334da6358813f6512e34') options=(!lto) _dirname="$(basename "$_rocblas")-$(basename "${source[0]}" ".tar.gz")" -# Number of threads for tensile build. Uses all threads by default. -_tensile_threads="$(nproc)" - -prepare() { - # See https://github.com/ROCmSoftwarePlatform/rocBLAS/commit/992429ff1d04195b10f9a3350668e180b34dbdb5 - cd "$_dirname" - patch -Np1 -i "$srcdir/include-path.patch" -} - build() { - local cmake_args=(-DCMAKE_INSTALL_PREFIX=/opt/rocm - -DCMAKE_PREFIX_PATH=/opt/rocm/llvm/lib/cmake/llvm - -Damd_comgr_DIR=/opt/rocm/lib/cmake/amd_comgr - -DBUILD_WITH_TENSILE=ON - -DTensile_LIBRARY_FORMAT=yaml - -DTensile_CPU_THREADS="$_tensile_threads" - -DTensile_CODE_OBJECT_VERSION=V3 - -DCMAKE_TOOLCHAIN_FILE=toolchain-linux.cmake - -DBUILD_TESTING=OFF) - if [[ -n "$AMDGPU_TARGETS" ]]; then - cmake_args+=(-DAMDGPU_TARGETS="$AMDGPU_TARGETS") - fi # -fcf-protection is not supported by HIP, see - # https://docs.amd.com/bundle/ROCm-Compiler-Reference-Guide-v5.2/page/Appendix_A.html + # https://docs.amd.com/bundle/ROCm-Compiler-Reference-Guide-v5.3/page/Appendix_A.html PATH="/opt/rocm/llvm/bin:${PATH}" \ - CXX=/opt/rocm/bin/hipcc \ CXXFLAGS="${CXXFLAGS} -fcf-protection=none" \ - cmake -B build -Wno-dev \ - -S "$_dirname" \ - "${cmake_args[@]}" - - make -C build + cmake \ + -Wno-dev \ + -B build \ + -S "$_dirname" \ + -DCMAKE_CXX_COMPILER=/opt/rocm/bin/hipcc \ + -DCMAKE_INSTALL_PREFIX=/opt/rocm \ + -DCMAKE_PREFIX_PATH=/opt/rocm/llvm/lib/cmake/llvm \ + -Damd_comgr_DIR=/opt/rocm/lib/cmake/amd_comgr \ + -DBUILD_WITH_TENSILE=ON \ + -DTensile_LIBRARY_FORMAT=yaml \ + -DTensile_CODE_OBJECT_VERSION=V3 \ + -DCMAKE_TOOLCHAIN_FILE=toolchain-linux.cmake \ + -DBUILD_TESTING=OFF + cmake --build build } package() { - DESTDIR="$pkgdir" make -C build install + DESTDIR="$pkgdir" cmake --install build + + echo "/opt/rocm/$pkgname/lib" > "$pkgname.conf" + install -Dm644 "$pkgname.conf" "$pkgdir/etc/ld.so.conf.d/rocblas.conf" - install -Dm644 /dev/stdin "$pkgdir/etc/ld.so.conf.d/rocblas.conf" << EOF -/opt/rocm/rocblas/lib -EOF install -Dm644 "$_dirname/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } |