Skip to content

Conversation

@shwina
Copy link
Contributor

@shwina shwina commented Nov 26, 2025

Closes #3749.

Following the study #3748, this PR adds support for ak.sort() for the CUDA backend, using https://nvidia.github.io/cccl/python/compute.html.

⚠️ This PR should not be merged in its current state - I'm opening it as a POC at this time.

@codecov
Copy link

codecov bot commented Nov 26, 2025

Codecov Report

❌ Patch coverage is 16.00000% with 42 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.60%. Comparing base (b749e49) to head (f434568).
⚠️ Report is 479 commits behind head on main.

Files with missing lines Patch % Lines
src/awkward/_connect/cuda/_compute.py 0.00% 24 Missing ⚠️
src/awkward/_backends/cupy.py 22.22% 14 Missing ⚠️
src/awkward/_kernels.py 50.00% 4 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
src/awkward/_kernels.py 69.78% <50.00%> (+0.41%) ⬆️
src/awkward/_backends/cupy.py 47.61% <22.22%> (-19.05%) ⬇️
src/awkward/_connect/cuda/_compute.py 0.00% <0.00%> (ø)

... and 198 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@shwina shwina changed the title Add ak.sort() for CUDA backend feat: Add ak.sort() for CUDA backend Nov 26, 2025
@github-actions
Copy link

The documentation preview is ready to be viewed at http://preview.awkward-array.org.s3-website.us-east-1.amazonaws.com/PR3750

Copy link
Member

@ianna ianna left a comment

Choose a reason for hiding this comment

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

@shwina - this is great! Thanks for implementing it. Let’s keep it open and discuss.

Comment on lines 186 to 217
strategy:
fail-fast: false
matrix:
cuda-version:
- 11
- 12
- 13

steps:
- name: Clean the workspace and mamba
run: |
rm -rf * .[!.]* || echo "Nothing to clean"
rm -rf ~/micromamba* || echo "Nothing to clean"
- uses: actions/checkout@v6
with:
submodules: true

- name: Get micromamba
uses: mamba-org/setup-micromamba@v2
with:
environment-name: test-env
init-shell: bash
create-args: >-
-c rapidsai
-c nvidia
python=3.13
cccl-python
cudf
cupy
cuda-version=${{ matrix.cuda-version }}
cuda-toolkit
cxx-compiler
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
strategy:
fail-fast: false
matrix:
cuda-version: [11, 12, 13]
steps:
- name: Clean the workspace and mamba
run: |
rm -rf * .[!.]* || echo "Nothing to clean"
rm -rf ~/micromamba* || echo "Nothing to clean"
- uses: actions/checkout@v6
with:
submodules: true
- name: Get micromamba (CUDA <= 11)
if: ${{ matrix.cuda-version < 12 }}
uses: mamba-org/setup-micromamba@v2
with:
environment-name: test-env
init-shell: bash
create-args: >-
-c rapidsai
-c nvidia
python=3.13
cudf
cupy
cuda-version=${{ matrix.cuda-version }}
cuda-toolkit
cxx-compiler
- name: Get micromamba (CUDA >= 12, add cccl-python)
if: ${{ matrix.cuda-version >= 12 }}
uses: mamba-org/setup-micromamba@v2
with:
environment-name: test-env
init-shell: bash
create-args: >-
-c rapidsai
-c nvidia
python=3.13
cccl-python
cudf
cupy
cuda-version=${{ matrix.cuda-version }}
cuda-toolkit
cxx-compiler

Copy link
Member

Choose a reason for hiding this comment

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

Here is a hopefully correct fixed matrix that installs cccl-python only when CUDA ≥ 12, and avoids the solver error when CUDA = 11.

Copy link
Member

Choose a reason for hiding this comment

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

@ariostas - given that we still want to use CUDA 11.

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 guessing CUDA 11 is EOL? I couldn't find any specific timeline, but @shwina would know. If that's the case let's just remove it and move on with 12 and 13.

Copy link
Member

Choose a reason for hiding this comment

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

It looks like it is EOL - looking at https://docs.nvidia.com/datacenter/tesla/drivers/supported-drivers-and-cuda-toolkit-versions.html and specifically the Note: All other previous driver branches not listed in the table above (such as R575, R565, R560, R550, R525, R515, R510, R495, R465, R460, R455, R450, R440, R418, R410) are end of life.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would it be preferable to open a separate PR to remove CUDA 11 from the build/test matrix?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, I think it is a good idea!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I opened #3758. If/when that is merged, I can revert some of the CUDA 11 handling introduced in this PR.

@shwina shwina force-pushed the add-cuda-backend-sort branch from 173b048 to 8fbd26f Compare December 1, 2025 19:19
@shwina shwina force-pushed the add-cuda-backend-sort branch from 8fbd26f to f434568 Compare December 4, 2025 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing ak.sort() for CUDA backend

5 participants