diff options
author | Torsten Keßler | 2022-10-16 15:25:45 +0200 |
---|---|---|
committer | Torsten Keßler | 2022-10-16 15:30:11 +0200 |
commit | 0c00b8c1274533f2c2993741bbb2be95ac37a165 (patch) | |
tree | db529a32c5bcf2f8c3b04c03447457998366793e /PKGBUILD | |
parent | 9090c07567b1112d33261513a43632235d10ab7c (diff) | |
download | aur-miopen-opencl.tar.gz |
upgpkg: miopen-opencl 5.3.0-1
* Patch for rocblas header was merged upstream
* Follow cmake template from wiki
* Update checksum
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 49 |
1 files changed, 21 insertions, 28 deletions
@@ -3,68 +3,61 @@ # Contributor: JP-Ellis <josh@jpellis.me> pkgname=miopen-opencl -pkgver=5.2.3 +pkgver=5.3.0 pkgrel=1 pkgdesc="AMD's Machine Intelligence Library (OpenCL backend)" arch=('x86_64') -url="https://rocmsoftwareplatform.github.io/MIOpen/doc/html" +url='https://rocmsoftwareplatform.github.io/MIOpen/doc/html' license=('MIT') depends=('ocl-icd' 'rocblas' 'rocm-llvm' 'rocm-llvm-mlir') -makedepends=('opencl-headers' 'rocm-cmake' 'cmake' 'miopengemm' 'sqlite' 'boost>=1.78') +makedepends=('opencl-headers' 'rocm-cmake' 'miopengemm' 'sqlite' 'boost') provides=('miopen') conflicts=('miopen') _git="https://github.com/ROCmSoftwarePlatform/MIOpen" -source=("$pkgname-$pkgver.tar.gz::$_git/archive/rocm-$pkgver.tar.gz" - "$_git/commit/9ae2418adf767794e9475274a4cf90e418f00a58.patch") -sha256sums=('28747847446955b3bab24f7fc65c1a6b863a12f12ad3a35e0312072482d38122' - 'SKIP') +source=("$pkgname-$pkgver.tar.gz::$_git/archive/rocm-$pkgver.tar.gz") +sha256sums=('c5819f593d71beeda2eb24b89182912240cc40f83b2b8f9de695a8e230aa4ea6') _dirname="$(basename "$_git")-$(basename "${source[0]}" .tar.gz)" prepare() { cd "$_dirname" # -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 # -fPIC fixes linking errors. export CC=/opt/rocm/llvm/bin/clang export CXX=/opt/rocm/llvm/bin/clang++ export CXXFLAGS="${CXXFLAGS} -fcf-protection=none -fPIC" # We can use the system SQLite and Boost - msg2 "Building dependencies" sed -i 's|^sqlite|#\0|' {,min-}requirements.txt sed -i 's|^boost|#\0|' {,min-}requirements.txt sed -i 's|^ROCmSoftwarePlatform/llvm-project-mlir|#\0|' {,min-}requirements.txt ./install_deps.cmake --minimum --prefix "$srcdir/deps" - - msg2 "Patching files" - for p in $srcdir/*.patch ; do - patch -p1 < $p - done } build() { - cd "$_dirname" - + # -fcf-protection is not supported by HIP, see + # https://docs.amd.com/bundle/ROCm-Compiler-Reference-Guide-v5.3/page/Appendix_A.html + # -fPIC fixes linking errors with boost. export CC=/opt/rocm/llvm/bin/clang export CXX=/opt/rocm/llvm/bin/clang++ export CXXFLAGS="${CXXFLAGS} -fcf-protection=none -fPIC" - cmake -B build -Wno-dev \ - -DMIOPEN_BACKEND=OpenCL \ - -DCMAKE_PREFIX_PATH="$srcdir/deps" \ - -DCMAKE_INSTALL_PREFIX=/opt/rocm - - make -C build + cmake \ + -Wno-dev \ + -B build \ + -S "$_dirname" \ + -DMIOPEN_BACKEND=OpenCL \ + -DCMAKE_PREFIX_PATH="$srcdir/deps" \ + -DCMAKE_INSTALL_PREFIX=/opt/rocm + cmake --build build } package() { - DESTDIR="$pkgdir" make -C "$_dirname/build" install + DESTDIR="$pkgdir" cmake --install build - install -d "$pkgdir/etc/ld.so.conf.d" - cat << EOF > "$pkgdir/etc/ld.so.conf.d/miopen.conf" -/opt/rocm/miopen/lib -EOF + echo '/opt/rocm/miopen/lib' > 'miopen.conf' + install -Dm644 "miopen.conf" "$pkgdir/etc/ld.so.conf.d/miopen.conf" - install -Dm644 "$srcdir/$_dirname/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + install -Dm644 "$_dirname/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } |