Skip to content

GH-47371: [Python] Fix installation of Numba-CUDA in CI environment#47372

Open
gmarkall wants to merge 1 commit intoapache:mainfrom
gmarkall:fix-numba-cuda-tests
Open

GH-47371: [Python] Fix installation of Numba-CUDA in CI environment#47372
gmarkall wants to merge 1 commit intoapache:mainfrom
gmarkall:fix-numba-cuda-tests

Conversation

@gmarkall
Copy link
Contributor

@gmarkall gmarkall commented Aug 19, 2025

Rationale for this change

As per the Numba-CUDA docs, numba-cuda should be installed with a variant depending on the CUDA version. Failing to specify the variant leads to numba-cuda being installed without the CUDA toolkit wheels that it needs.

Numba-CUDA installation docs: https://nvidia.github.io/numba-cuda/user/installation.html

What changes are included in this PR?

This commit adds the variant specifier to the installation.

I think Arrow is using CUDA 11.7 in CI images, so I've changed the Numba-CUDA version to 0.18.1, which is the last version to support CUDA 11 (the Numba-CUDA policy is to support all minor versions within the last two major versions of CUDA). If Arrow moves to CUDA 12 for CI images, this could be changed back to latest in future.

Are these changes tested?

Yes.

Are there any user-facing changes?

No.

…ment

As per the Numba-CUDA docs, `numba-cuda` should be installed with a
variant depending on the CUDA version. Failing to specify the variant
leads to `numba-cuda` being installed without the CUDA toolkit wheels
that it needs. This commit adds the variant specifier to the
installation.

I think Arrow is using CUDA 11.7 in CI images, so I've changed the
Numba-CUDA version to 0.18.1, which is the last version to support CUDA
11 (the Numba-CUDA policy is to support all minor versions within the
last two major versions of CUDA). IF Arrow moves to CUDA 12 for CI
images, this could be changed back to `latest` in future.

Numba-CUDA installation docs: https://nvidia.github.io/numba-cuda/user/installation.html
@github-actions
Copy link

⚠️ GitHub issue #47371 has been automatically assigned in GitHub to PR creator.

Comment on lines +51 to +56
if [ "$#" -eq 3 ]; then
cuda=$3
else
# Default to CUDA 11
cuda=11
fi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious, is it possible to query the system to get the CUDA version instead of having to pass it explicitly?

@pitrou
Copy link
Member

pitrou commented Aug 19, 2025

@github-actions crossbow submit -g python

@github-actions github-actions bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Aug 19, 2025
@github-actions
Copy link

Revision: 260fef9

Submitted crossbow builds: ursacomputing/crossbow @ actions-5460fb5ce2

Task Status
example-python-minimal-build-fedora-conda GitHub Actions
example-python-minimal-build-ubuntu-venv GitHub Actions
test-conda-python-3.10 GitHub Actions
test-conda-python-3.10-hdfs-2.9.2 GitHub Actions
test-conda-python-3.10-hdfs-3.2.1 GitHub Actions
test-conda-python-3.10-pandas-latest-numpy-latest GitHub Actions
test-conda-python-3.11 GitHub Actions
test-conda-python-3.11-dask-latest GitHub Actions
test-conda-python-3.11-dask-upstream_devel GitHub Actions
test-conda-python-3.11-hypothesis GitHub Actions
test-conda-python-3.11-pandas-latest-numpy-1.26 GitHub Actions
test-conda-python-3.11-pandas-latest-numpy-latest GitHub Actions
test-conda-python-3.11-pandas-nightly-numpy-nightly GitHub Actions
test-conda-python-3.11-pandas-upstream_devel-numpy-nightly GitHub Actions
test-conda-python-3.11-spark-master GitHub Actions
test-conda-python-3.12 GitHub Actions
test-conda-python-3.12-cpython-debug GitHub Actions
test-conda-python-3.13 GitHub Actions
test-conda-python-3.9 GitHub Actions
test-conda-python-3.9-pandas-1.1.3-numpy-1.19.5 GitHub Actions
test-conda-python-emscripten GitHub Actions
test-cuda-python-ubuntu-22.04-cuda-11.7.1 GitHub Actions
test-debian-12-python-3-amd64 GitHub Actions
test-debian-12-python-3-i386 GitHub Actions
test-fedora-42-python-3 GitHub Actions
test-ubuntu-22.04-python-3 GitHub Actions
test-ubuntu-22.04-python-313-freethreading GitHub Actions
test-ubuntu-24.04-python-3 GitHub Actions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting committer review Awaiting committer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants