Date: Thursday, March 9, 2023 @ 19:06:24
  Author: tpkessler
Revision: 1417174

archrelease: copy trunk to community-testing-x86_64

Added:
  magma/repos/community-testing-x86_64/
  magma/repos/community-testing-x86_64/PKGBUILD
    (from rev 1417173, magma/trunk/PKGBUILD)
  magma/repos/community-testing-x86_64/add_cuda_archs.patch
    (from rev 1417173, magma/trunk/add_cuda_archs.patch)

----------------------+
 PKGBUILD             |   95 +++++++++++++++++++++++++++++++++++++++++++++++++
 add_cuda_archs.patch |   45 +++++++++++++++++++++++
 2 files changed, 140 insertions(+)

Copied: magma/repos/community-testing-x86_64/PKGBUILD (from rev 1417173, 
magma/trunk/PKGBUILD)
===================================================================
--- community-testing-x86_64/PKGBUILD                           (rev 0)
+++ community-testing-x86_64/PKGBUILD   2023-03-09 19:06:24 UTC (rev 1417174)
@@ -0,0 +1,95 @@
+# Maintainer: Sven-Hendrik Haase <[email protected]>
+# Maintainer: Torsten Keßler <[email protected]>
+# Contributor: bartus <arch-user-repoᘓbartus.33mail.com>
+# Contributor: pingplug <[email protected]>
+# Contributor: cornholio <[email protected]>
+
+_pkgname=magma
+pkgbase=$_pkgname
+pkgname=(magma-cuda magma-hip)
+pkgver=2.7.1
+pkgrel=3
+_pkgdesc="Matrix Algebra on GPU and Multicore Architectures"
+arch=('x86_64')
+url="https://icl.utk.edu/magma/";
+license=('custom')
+depends=('blas' 'lapack')
+makedepends=('gcc-fortran' 'cmake' 'ninja' 'cuda' 'hip-runtime-amd' 'hipblas' 
'hipsparse')
+optdepends=('python: for examples and tests'
+            'gcc-fortran: Fortran interface')
+source=("${_pkgname}-${pkgver}.tar.gz::https://icl.utk.edu/projectsfiles/${_pkgname}/downloads/${_pkgname}-${pkgver}.tar.gz";
+        'add_cuda_archs.patch')
+sha256sums=('d9c8711c047a38cae16efde74bee2eb3333217fd2711e1e9b8606cbbb4ae1a50'
+            '1ed3706a65a124ecef71012273687307aac70bfc80bc99a978002dfb0ee000cc')
+options=(!lto)
+
+prepare() {
+  cp -r "${_pkgname}-${pkgver}" "${_pkgname}-${pkgver}-cuda"
+  cp -r "${_pkgname}-${pkgver}" "${_pkgname}-${pkgver}-hip"
+
+  cd "${_pkgname}-${pkgver}-cuda"
+  patch -Np1 -i "${srcdir}/add_cuda_archs.patch"
+}
+
+build() {
+  echo "Build with cuda backend"
+  cd "${srcdir}/${_pkgname}-${pkgver}-cuda"
+  cmake \
+    -Bbuild \
+    -GNinja \
+    -DCMAKE_BUILD_TYPE=Release \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DBUILD_SHARED_LIBS=ON \
+    -DGPU_TARGET="sm_52 sm_53 sm_60 sm_61 sm_62 sm_70 sm_72 sm_75 sm_80 sm_86 
sm_87 sm_89 sm_90"
+  ninja -C build
+
+  echo "Build with rocm/hip backend"
+  cd "${srcdir}/${_pkgname}-${pkgver}-hip"
+  # -fcf-protection is not supported by HIP, see
+  # 
https://docs.amd.com/bundle/ROCm-Compiler-Reference-Guide-v5.4/page/Appendix_A.html
+  CXXFLAGS="${CXXFLAGS} -fcf-protection=none" \
+  cmake \
+    -Bbuild \
+    -GNinja \
+    -DCMAKE_CXX_COMPILER=/opt/rocm/bin/hipcc \
+    -DCMAKE_BUILD_TYPE=Release \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DBUILD_SHARED_LIBS=ON \
+    -DMAGMA_ENABLE_HIP=ON \
+    -DGPU_TARGET="gfx803 gfx900 gfx906:xnack- gfx908:xnack- gfx90a:xnack+ 
gfx90a:xnack- gfx1010 gfx1011 gfx1012 gfx1030"
+    #List of GPU targets from rocBLAS
+  ninja -C build
+}
+
+_package() {
+  DESTDIR="${pkgdir}" ninja -Cbuild install
+
+  install -d "${pkgdir}"/usr/share/magma/example
+  cp -r "${srcdir}"/magma-${pkgver}/example/* 
"${pkgdir}"/usr/share/magma/example/
+  install -d "${pkgdir}"/usr/share/magma/testing
+  cp -r "${srcdir}"/magma-${pkgver}/testing/* 
"${pkgdir}"/usr/share/magma/testing/
+  install -Dm644 "${srcdir}"/magma-${pkgver}/COPYRIGHT 
"${pkgdir}"/usr/share/licenses/magma/LICENSE
+}
+
+package_magma-cuda() {
+  pkgdesc="${_pkgdesc} (with CUDA)"
+  depends+=(cuda)
+  provides=(magma)
+  conflicts=(magma)
+
+  cd "${srcdir}/${_pkgname}-${pkgver}-cuda"
+  _package
+}
+
+package_magma-hip() {
+  pkgdesc="${_pkgdesc} (with ROCm/HIP)"
+  depends+=(hip-runtime-amd hipblas hipsparse)
+  provides=(hipmagma magma)
+  conflicts=(magma)
+  replaces=(hipmagma)
+
+  cd "${srcdir}/${_pkgname}-${pkgver}-hip"
+  _package
+}
+
+# vim:set ts=2 sw=2 et:

Copied: magma/repos/community-testing-x86_64/add_cuda_archs.patch (from rev 
1417173, magma/trunk/add_cuda_archs.patch)
===================================================================
--- community-testing-x86_64/add_cuda_archs.patch                               
(rev 0)
+++ community-testing-x86_64/add_cuda_archs.patch       2023-03-09 19:06:24 UTC 
(rev 1417174)
@@ -0,0 +1,45 @@
+--- magma-2.6.2lol/CMakeLists.txt      2022-10-06 07:08:50.732278629 +0200
++++ magma-2.6.2/CMakeLists.txt 2022-10-06 07:10:36.348650499 +0200
+@@ -294,6 +294,42 @@
+         message( STATUS "    compile for CUDA arch 8.0 (Ampere)" )
+     endif()
+ 
++    if (GPU_TARGET MATCHES sm_86)
++        if (NOT MIN_ARCH)
++            set( MIN_ARCH 860 )
++        endif()
++        set( NV_SM ${NV_SM} -gencode arch=compute_86,code=sm_86 )
++        set( NV_COMP        -gencode arch=compute_86,code=compute_86 )
++        message( STATUS "    compile for CUDA arch 8.6" )
++    endif()
++
++    if (GPU_TARGET MATCHES sm_87)
++        if (NOT MIN_ARCH)
++            set( MIN_ARCH 870 )
++        endif()
++        set( NV_SM ${NV_SM} -gencode arch=compute_87,code=sm_87 )
++        set( NV_COMP        -gencode arch=compute_87,code=compute_87 )
++        message( STATUS "    compile for CUDA arch 8.7" )
++    endif()
++
++    if (GPU_TARGET MATCHES sm_89)
++        if (NOT MIN_ARCH)
++            set( MIN_ARCH 890 )
++        endif()
++        set( NV_SM ${NV_SM} -gencode arch=compute_89,code=sm_89 )
++        set( NV_COMP        -gencode arch=compute_89,code=compute_89 )
++        message( STATUS "    compile for CUDA arch 8.9" )
++    endif()
++
++    if (GPU_TARGET MATCHES sm_90)
++        if (NOT MIN_ARCH)
++            set( MIN_ARCH 900 )
++        endif()
++        set( NV_SM ${NV_SM} -gencode arch=compute_90,code=sm_90 )
++        set( NV_COMP        -gencode arch=compute_90,code=compute_90 )
++        message( STATUS "    compile for CUDA arch 9.0" )
++    endif()
++
+     if (NOT MIN_ARCH)
+         message( FATAL_ERROR "GPU_TARGET must contain one or more of Fermi, 
Kepler, Maxwell, Pascal, Volta, Turing, Ampere, or valid sm_[0-9][0-9]" )
+     endif()

Reply via email to