summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRanieri Althoff2019-12-11 03:51:11 -0300
committerRanieri Althoff2019-12-11 03:58:17 -0300
commitb8a1a32f68d73efcef3f46029df4e7a1d80ca203 (patch)
tree1337aafe99a22205c46ec401d07a59495d436e67
parenta0f3af8f39b262576e048fbe30b48cbd1dfca5a8 (diff)
downloadaur-b8a1a32f68d73efcef3f46029df4e7a1d80ca203.tar.gz
v2.10.0-2
- Simplify thread calc - Use git for small repositories
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD72
2 files changed, 45 insertions, 51 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ceb664b4fa0..5e7eaafdc1d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = rocm-opencl-runtime
pkgdesc = ROCm OpenCLâ„¢ Compatible Runtime
pkgver = 2.10.0
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime
arch = x86_64
license = MIT
@@ -14,21 +14,21 @@ pkgbase = rocm-opencl-runtime
provides = rocm-opencl-runtime
provides = opencl-driver
conflicts = rocm-opencl-git
- source = rocm-opencl-runtime-2.10.0.tar.gz::https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/roc-2.10.0.tar.gz
- source = rocm-opencl-driver-2.10.0.tar.gz::https://github.com/RadeonOpenCompute/ROCm-OpenCL-Driver/archive/roc-2.10.0.tar.gz
- source = llvm-roc-ocl-2.10.0.tar.gz::https://github.com/RadeonOpenCompute/llvm/archive/roc-ocl-2.10.0.tar.gz
- source = clang-roc-2.10.0.tar.gz::https://github.com/RadeonOpenCompute/clang/archive/roc-2.10.0.tar.gz
- source = lld-roc-ocl-2.10.0.tar.gz::https://github.com/RadeonOpenCompute/lld/archive/roc-ocl-2.10.0.tar.gz
- source = rocm-device-libs-2.10.0.tar.gz::https://github.com/RadeonOpenCompute/ROCm-Device-Libs/archive/roc-ocl-2.10.0.tar.gz
- source = OpenCL-ICD-Loader-978b4b3a29a3aebc86ce9315d5c5963e88722d03.zip::https://github.com/KhronosGroup/OpenCL-ICD-Loader/archive/978b4b3a29a3aebc86ce9315d5c5963e88722d03.zip
+ source = rocm-opencl-runtime::git+https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime#tag=roc-2.10.0
+ source = rocm-opencl-driver::git+https://github.com/RadeonOpenCompute/ROCm-OpenCL-Driver#tag=roc-2.10.0
+ source = llvm-ocl-2.10.0.tar.gz::https://github.com/RadeonOpenCompute/llvm/archive/roc-ocl-2.10.0.tar.gz
+ source = clang-2.10.0.tar.gz::https://github.com/RadeonOpenCompute/clang/archive/roc-2.10.0.tar.gz
+ source = lld-ocl-2.10.0.tar.gz::https://github.com/RadeonOpenCompute/lld/archive/roc-ocl-2.10.0.tar.gz
+ source = rocm-device-libs::git+https://github.com/RadeonOpenCompute/ROCm-Device-Libs#tag=roc-ocl-2.10.0
+ source = opencl-icd-loader::git+https://github.com/KhronosGroup/OpenCL-ICD-Loader#commit=978b4b3a29a3aebc86ce9315d5c5963e88722d03
source = fix_rocm_opencl_build_order.patch
- sha256sums = 7b38b1be2217d7b0ac552e4cfb5fe38660fa59ef61f2a46946bac6fba6efdf7c
- sha256sums = 00a50696732a4cd3b880cfb11a64d02c5dfd956a79796eacda166173c14eb97a
+ sha256sums = SKIP
+ sha256sums = SKIP
sha256sums = c46ec3568b754a7aced6139bcc254d39ddb89016b282c467ae1b5536d8021540
sha256sums = acdebf229a2120ad0ccdc48a6b0e863a6a4d89f46bb62e7296f2f16bbc4a04a7
sha256sums = 105cedd4a31a6d6ad51043c384129a7705f9a5f65414e60a07c9193411b756f0
- sha256sums = ed56c5f742bd8b2fc7e1124434fa575f51573900444adc235ce6785f3eb56d9d
- sha256sums = 6c79fddd59e92182d7bc9048415b51e60e49f952b11eeffd69cccb3081359f78
+ sha256sums = SKIP
+ sha256sums = SKIP
sha256sums = 0f735299810e9e22cd57f5b96a7628a0f399d445a1f3bacefd8b890e84ca372f
pkgname = rocm-opencl-runtime
diff --git a/PKGBUILD b/PKGBUILD
index 1925403af1d..11e6238e0e5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,45 +1,45 @@
-# Maintainer: Ulysses R Ribeiro <ulyssesrr@gmail.com>
+# Maintainer: Ranieri Althoff <ranisalt+aur at gmail dot com>
_opencl_icd_loader_commit="978b4b3a29a3aebc86ce9315d5c5963e88722d03"
pkgname=rocm-opencl-runtime
pkgver=2.10.0
-pkgrel=1
+pkgrel=2
pkgdesc='ROCm OpenCLâ„¢ Compatible Runtime'
arch=('x86_64')
-url="https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime"
+url='https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime'
license=('MIT')
-depends=("rocr-runtime>=${pkgver}" "opencl-icd-loader")
+depends=("rocr-runtime>=${pkgver}" 'opencl-icd-loader')
makedepends=(mesa cmake ninja git)
-provides=("${pkgname}" "opencl-driver")
-conflicts=("rocm-opencl-git")
+provides=("${pkgname}" 'opencl-driver')
+conflicts=('rocm-opencl-git')
source=(
- "rocm-opencl-runtime-${pkgver}.tar.gz::https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/roc-${pkgver}.tar.gz"
- "rocm-opencl-driver-${pkgver}.tar.gz::https://github.com/RadeonOpenCompute/ROCm-OpenCL-Driver/archive/roc-${pkgver}.tar.gz"
- "llvm-roc-ocl-${pkgver}.tar.gz::https://github.com/RadeonOpenCompute/llvm/archive/roc-ocl-${pkgver}.tar.gz"
- "clang-roc-${pkgver}.tar.gz::https://github.com/RadeonOpenCompute/clang/archive/roc-${pkgver}.tar.gz"
- "lld-roc-ocl-${pkgver}.tar.gz::https://github.com/RadeonOpenCompute/lld/archive/roc-ocl-${pkgver}.tar.gz"
- "rocm-device-libs-${pkgver}.tar.gz::https://github.com/RadeonOpenCompute/ROCm-Device-Libs/archive/roc-ocl-${pkgver}.tar.gz"
- "OpenCL-ICD-Loader-${_opencl_icd_loader_commit}.zip::https://github.com/KhronosGroup/OpenCL-ICD-Loader/archive/${_opencl_icd_loader_commit}.zip"
+ "rocm-opencl-runtime::git+https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime#tag=roc-${pkgver}"
+ "rocm-opencl-driver::git+https://github.com/RadeonOpenCompute/ROCm-OpenCL-Driver#tag=roc-${pkgver}"
+ "llvm-ocl-${pkgver}.tar.gz::https://github.com/RadeonOpenCompute/llvm/archive/roc-ocl-${pkgver}.tar.gz"
+ "clang-${pkgver}.tar.gz::https://github.com/RadeonOpenCompute/clang/archive/roc-${pkgver}.tar.gz"
+ "lld-ocl-${pkgver}.tar.gz::https://github.com/RadeonOpenCompute/lld/archive/roc-ocl-${pkgver}.tar.gz"
+ "rocm-device-libs::git+https://github.com/RadeonOpenCompute/ROCm-Device-Libs#tag=roc-ocl-${pkgver}"
+ "opencl-icd-loader::git+https://github.com/KhronosGroup/OpenCL-ICD-Loader#commit=${_opencl_icd_loader_commit}"
'fix_rocm_opencl_build_order.patch'
)
-sha256sums=('7b38b1be2217d7b0ac552e4cfb5fe38660fa59ef61f2a46946bac6fba6efdf7c'
- '00a50696732a4cd3b880cfb11a64d02c5dfd956a79796eacda166173c14eb97a'
+sha256sums=('SKIP'
+ 'SKIP'
'c46ec3568b754a7aced6139bcc254d39ddb89016b282c467ae1b5536d8021540'
'acdebf229a2120ad0ccdc48a6b0e863a6a4d89f46bb62e7296f2f16bbc4a04a7'
'105cedd4a31a6d6ad51043c384129a7705f9a5f65414e60a07c9193411b756f0'
- 'ed56c5f742bd8b2fc7e1124434fa575f51573900444adc235ce6785f3eb56d9d'
- '6c79fddd59e92182d7bc9048415b51e60e49f952b11eeffd69cccb3081359f78'
+ 'SKIP'
+ 'SKIP'
'0f735299810e9e22cd57f5b96a7628a0f399d445a1f3bacefd8b890e84ca372f')
prepare() {
# emulate repo opencl.xml layout
cd "$srcdir"
- ln -s "$srcdir/ROCm-OpenCL-Runtime-roc-$pkgver" opencl
+ ln -s "$srcdir/rocm-opencl-runtime" opencl
mkdir -p "$srcdir/opencl/compiler"
- ln -s "$srcdir/ROCm-OpenCL-Driver-roc-$pkgver" opencl/compiler/driver
+ ln -s "$srcdir/rocm-opencl-driver" opencl/compiler/driver
ln -s "$srcdir/llvm-roc-ocl-$pkgver" opencl/compiler/llvm
mkdir -p "$srcdir/opencl/compiler/llvm/tools"
@@ -47,10 +47,10 @@ prepare() {
ln -s "$srcdir/lld-roc-ocl-$pkgver" opencl/compiler/llvm/tools/lld
mkdir -p "$srcdir/opencl/library"
- ln -s "$srcdir/ROCm-Device-Libs-roc-ocl-$pkgver" opencl/library/amdgcn
+ ln -s "$srcdir/rocm-device-libs" opencl/library/amdgcn
mkdir -p "$srcdir/opencl/api/opencl/khronos"
- ln -s "$srcdir/OpenCL-ICD-Loader-$_opencl_icd_loader_commit" opencl/api/opencl/khronos/icd
+ ln -s "$srcdir/opencl-icd-loader" opencl/api/opencl/khronos/icd
# Fix build missing dependency
# https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/issues/64#issuecomment-473502685
@@ -59,32 +59,26 @@ prepare() {
}
build() {
- MEM_AVAIL=`cat /proc/meminfo | grep MemTotal | awk {'print $2'}`
- AVAIL_THREADS=`nproc`
- # require ~1536MB per thread
- MAX_THREADS=`echo $(( "$MEM_AVAIL" / $(( 1024 * 1536 ))))`
- if [ "$MAX_THREADS" -lt "$AVAIL_THREADS" ]; then
- NUM_BUILD_THREADS="$MAX_THREADS"
- else
- NUM_BUILD_THREADS="$AVAIL_THREADS"
- fi
- if [ "$NUM_BUILD_THREADS" -lt 1 ]; then
- NUM_BUILD_THREADS=1
- fi
-
mkdir -p "$srcdir/build"
cd "$srcdir/build"
- ## mimic AMD official binaries LDFLAGS
- #export LDFLAGS="-Wl,--no-as-needed"
+ if check_buildoption "ccache" "y"; then
+ CMAKE_FLAGS="-DROCM_CCACHE_BUILD=ON"
+ fi
- cmake -DCMAKE_BUILD_TYPE=Release \
+ cmake $CMAKE_FLAGS \
+ -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/opt/rocm/opencl \
-DCLANG_ENABLE_STATIC_ANALYZER=ON \
-G Ninja \
"$srcdir/opencl"
- # -jNUM_BUILD_THREADS to avoid Out of Memory
- ninja "-j$NUM_BUILD_THREADS"
+
+ # building LLVM/Clang requires ~1.5G per unit
+ THREADS=$(( ($(getconf _PHYS_PAGES) * $(getconf PAGESIZE)) / 1610612736 ))
+ if [ "$THREADS" -lt 1 ]; then
+ THREADS=1
+ fi
+ ninja "-j$THREADS"
# FIXME Check why lld has to built manually since 2.3.0
ninja lld