Jakub Klinkovský pushed to branch main at Arch Linux / Packaging / Packages /
python-cupy
Commits:
dde03703 by Lubosz Sarnecki at 2025-11-21T19:48:21+01:00
Fix build with ROCm 7.1.0
* Apply ROCm 7.0 patch from main branch.
* Update .SRCINFO
* Make hipcc build in parallel (thanks to @lahwaacz)
- - - - -
7c34857c by Lubosz Sarnecki at 2025-11-21T20:24:47+01:00
Exclude ROCm architectures below gfx1000.
The build fails due to linking errors when trying to build 22 arches
(with only gfx950 excluded).
This number could be higher, it needs to be determined by
experimentation.
- - - - -
2 changed files:
- .SRCINFO
- PKGBUILD
Changes:
=====================================
.SRCINFO
=====================================
@@ -36,10 +36,12 @@ pkgbase = python-cupy
source =
git+https://github.com/NVIDIA/cccl.git#commit=3a388b7b01512d48474b98389a3e776c8d8f817a
source =
git+https://github.com/dmlc/dlpack.git#commit=cd0d5e4ff888b388aef4f9b6bd5d9aa5737a020e
source =
git+https://github.com/NVIDIA/jitify.git#commit=1a0ca0e837405506f3b8f7883bacb71c20d86d96
+ source =
python-cupy-cbd87ae9c48cc8c0dbeff091e5eb9e04d22b68bf.patch::https://github.com/cupy/cupy/commit/cbd87ae9c48cc8c0dbeff091e5eb9e04d22b68bf.patch
b2sums =
be2eb7cc3cdb80f0ff953be8faeae48641c16526f6f73995c9c8caeccdbf26bc8fdc98b813c2ca2e0c7a12ab93197fd836e1e37df1105e104d69fecc7e9b9b13
b2sums =
398fea632811425ea79cff315eeb7fcbe9370e706445477784e05cc2e2517ab7106606d52603175a1ac83b0026daa5a09a07cebe2efd8edae50e48b1b82efbeb
b2sums =
ee9287869ad46f81bd6ec67a0f17cd3a28c7a4921177e1d3bc5bf3469223d0518ab71b8bfab3ecc9dca0030f55fbac607c20e33d0b2951b042b0423893c1d46d
b2sums =
a03479f41e38b1f35c39a14ea8d13ecaec3d57f8f1c12fd37a9d53af8406ba328628493a76882c37cad82d2da441a34142407caf610d480122a072b73bbb1c61
+ b2sums =
d6f40dda41d2125597cfc3d6a311565c709f7d8d02bde5b671026b25070ea087bd5652ffac96af1bcd95f745fd799a0d8aa732739d4189ae9e51bb2ad488da41
pkgname = python-cupy
depends = cuda
=====================================
PKGBUILD
=====================================
@@ -1,4 +1,5 @@
# Maintainer: Jakub Klinkovský <lahwaacz at archlinux dot org>
+# Contributor: Lubosz Sarnecki <[email protected]>
_name=cupy
pkgbase=python-cupy
@@ -54,11 +55,14 @@ source=(
git+https://github.com/NVIDIA/cccl.git#commit=$_cccl_commit
git+https://github.com/dmlc/dlpack.git#commit=$_dlpack_commit
git+https://github.com/NVIDIA/jitify.git#commit=$_jitify_commit
+
$pkgbase-cbd87ae9c48cc8c0dbeff091e5eb9e04d22b68bf.patch::https://github.com/cupy/cupy/commit/cbd87ae9c48cc8c0dbeff091e5eb9e04d22b68bf.patch
)
b2sums=('be2eb7cc3cdb80f0ff953be8faeae48641c16526f6f73995c9c8caeccdbf26bc8fdc98b813c2ca2e0c7a12ab93197fd836e1e37df1105e104d69fecc7e9b9b13'
'398fea632811425ea79cff315eeb7fcbe9370e706445477784e05cc2e2517ab7106606d52603175a1ac83b0026daa5a09a07cebe2efd8edae50e48b1b82efbeb'
'ee9287869ad46f81bd6ec67a0f17cd3a28c7a4921177e1d3bc5bf3469223d0518ab71b8bfab3ecc9dca0030f55fbac607c20e33d0b2951b042b0423893c1d46d'
-
'a03479f41e38b1f35c39a14ea8d13ecaec3d57f8f1c12fd37a9d53af8406ba328628493a76882c37cad82d2da441a34142407caf610d480122a072b73bbb1c61')
+
'a03479f41e38b1f35c39a14ea8d13ecaec3d57f8f1c12fd37a9d53af8406ba328628493a76882c37cad82d2da441a34142407caf610d480122a072b73bbb1c61'
+
'd6f40dda41d2125597cfc3d6a311565c709f7d8d02bde5b671026b25070ea087bd5652ffac96af1bcd95f745fd799a0d8aa732739d4189ae9e51bb2ad488da41')
+
prepare() {
cd $_name-$pkgver
@@ -70,6 +74,10 @@ prepare() {
# release version constraints for Cython
sed -i 's|Cython>=[0-9.]\+,<[0-9.]\+|Cython|' pyproject.toml
+ # Backport ROCm 7.0 support from main branch
+ #
https://github.com/cupy/cupy/commit/cbd87ae9c48cc8c0dbeff091e5eb9e04d22b68bf
+ patch -p1 < "$srcdir/$pkgbase-cbd87ae9c48cc8c0dbeff091e5eb9e04d22b68bf.patch"
+
# copy the source tree for the ROCm build
# (most artifacts end up in the build/ directory but .cpp files get generated
# along the other sources)
@@ -78,20 +86,23 @@ prepare() {
}
build() {
+ # CUDA build
export CUPY_NUM_BUILD_JOBS="$(nproc)"
export CUPY_NUM_NVCC_THREADS="$(nproc)"
- # CUDA build
cd "$srcdir"/$_name-$pkgver
LDFLAGS="$LDFLAGS -L/opt/cuda/targets/x86_64-linux/lib/stubs" \
python -m build --wheel --no-isolation
# ROCm build
+ export HIPCC_COMPILE_FLAGS_APPEND="-parallel-jobs=$(nproc)"
+ export HIPCC_LINK_FLAGS_APPEND="-parallel-jobs=$(nproc)"
+
cd "$srcdir"/$_name-$pkgver-rocm
CUDA_PATH= \
CUPY_INSTALL_USE_HIP=1 \
ROCM_HOME=/opt/rocm \
- HCC_AMDGPU_TARGET=$(rocm-supported-gfx -e gfx950 -d ,) \
+ HCC_AMDGPU_TARGET=$(rocm-supported-gfx -e
gfx900,gfx906:xnack-,gfx908:xnack-,gfx90a:xnack+,gfx90a:xnack-,gfx942,gfx950 -d
,) \
python -m build --wheel --no-isolation
}
View it on GitLab:
https://gitlab.archlinux.org/archlinux/packaging/packages/python-cupy/-/compare/0f3a57ec5b7e7fe6af3b5f017e897aa25fec7680...7c34857cea0966d7798755d07900829ffaa3c7ee
--
View it on GitLab:
https://gitlab.archlinux.org/archlinux/packaging/packages/python-cupy/-/compare/0f3a57ec5b7e7fe6af3b5f017e897aa25fec7680...7c34857cea0966d7798755d07900829ffaa3c7ee
You're receiving this email because of your account on gitlab.archlinux.org.