Skip to content

feat(hipcub): Add CCCL 3.0.x support - #4079

Closed
matyas-streamhpc wants to merge 96 commits into
ROCm:developfrom
StreamHPC:users/matyas-streamhpc/hipcub-cccl-3-0
Closed

feat(hipcub): Add CCCL 3.0.x support#4079
matyas-streamhpc wants to merge 96 commits into
ROCm:developfrom
StreamHPC:users/matyas-streamhpc/hipcub-cccl-3-0

Conversation

@matyas-streamhpc

@matyas-streamhpc matyas-streamhpc commented Jan 26, 2026

Copy link
Copy Markdown
Collaborator

Add CCCL 3.0.x support for hipCUB library.

Additional updates: fix CUB backend

JIRA ID : EXSWSTRHPC-300

@assistant-librarian assistant-librarian Bot added the external contribution Code contribution from users community.. label Jan 26, 2026
@matyas-streamhpc
matyas-streamhpc force-pushed the users/matyas-streamhpc/hipcub-cccl-3-0 branch from b533ef0 to f0e93d0 Compare January 27, 2026 17:34
@RobsonRLemos RobsonRLemos added the organization: streamhpc contributors from streamhpc label Jan 28, 2026
@matyas-streamhpc
matyas-streamhpc force-pushed the users/matyas-streamhpc/hipcub-cccl-3-0 branch from f0e93d0 to 425029f Compare January 29, 2026 10:36
@matyas-streamhpc
matyas-streamhpc marked this pull request as ready for review January 29, 2026 10:50
@matyas-streamhpc
matyas-streamhpc requested review from a team as code owners January 29, 2026 10:50
@matyas-streamhpc
matyas-streamhpc force-pushed the users/matyas-streamhpc/hipcub-cccl-3-0 branch from 425029f to 45bf6cd Compare January 29, 2026 14:21
Comment thread projects/hipcub/hipcub/include/hipcub/backend/cub/device/device_reduce.hpp Outdated
Comment thread projects/hipcub/hipcub/include/hipcub/backend/cub/device/device_select.hpp Outdated
@matyas-streamhpc
matyas-streamhpc force-pushed the users/matyas-streamhpc/hipcub-cccl-3-0 branch from 64c2f95 to a6bd6e0 Compare February 9, 2026 10:58
Comment thread projects/rocprim/CHANGELOG.md Outdated
@matyas-streamhpc
matyas-streamhpc force-pushed the users/matyas-streamhpc/hipcub-cccl-3-0 branch from a6bd6e0 to 01c6c4a Compare February 11, 2026 19:37
@stanleytsang-amd

Copy link
Copy Markdown
Contributor

There are merge conflicts and it looks like the RadixSort 4g test is still failing as well as DeviceMerge. Rerunning CI to make sure it isn't a flaky CI problem, but perhaps the RadixSort test fix is not quite there yet.

@stanleytsang-amd

Copy link
Copy Markdown
Contributor

@matyas-streamhpc RadixSort 4G test is timing out on Windows + gfx1151

47/47 Test #23: hipcub.DeviceRadixSort ............***Timeout 305.22 sec
Running main() from B:\build\third-party\googletest\source\googletest\src\gtest_main.cc
[==========] Running 126 tests from 32 test suites.
[----------] Global test environment set-up.
[----------] 2 tests from HipcubDeviceRadixSort
[ RUN ] HipcubDeviceRadixSort.SortKeysOver4G

Also please resolve the merge conflicts, I am unable to run math-ci until then.

@matyas-streamhpc
matyas-streamhpc force-pushed the users/matyas-streamhpc/hipcub-cccl-3-0 branch from 01c6c4a to 5129a04 Compare March 5, 2026 08:50
@matyas-streamhpc

Copy link
Copy Markdown
Collaborator Author

@matyas-streamhpc RadixSort 4G test is timing out on Windows + gfx1151

47/47 Test #23: hipcub.DeviceRadixSort ............***Timeout 305.22 sec Running main() from B:\build\third-party\googletest\source\googletest\src\gtest_main.cc [==========] Running 126 tests from 32 test suites. [----------] Global test environment set-up. [----------] 2 tests from HipcubDeviceRadixSort [ RUN ] HipcubDeviceRadixSort.SortKeysOver4G

Also please resolve the merge conflicts, I am unable to run math-ci until then.

I rebased the branch and I added the fix for Windows. The CI job is passing for Windows now.

@matyas-streamhpc
matyas-streamhpc force-pushed the users/matyas-streamhpc/hipcub-cccl-3-0 branch 3 times, most recently from e012a58 to c38a3c2 Compare March 16, 2026 13:04
@matyas-streamhpc
matyas-streamhpc force-pushed the users/matyas-streamhpc/hipcub-cccl-3-0 branch from b146369 to 89a22db Compare March 18, 2026 13:51
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #4079       +/-   ##
============================================
- Coverage    67.26%   39.04%   -28.22%     
============================================
  Files         1844      152     -1692     
  Lines       284014    25692   -258322     
  Branches     39839      567    -39272     
============================================
- Hits        191037    10031   -181006     
+ Misses       76518    15284    -61234     
+ Partials     16459      377    -16082     
Flag Coverage Δ
hipBLAS ?
hipBLASLt ?
hipCUB ?
hipDNN ?
hipFFT ?
hipRAND ?
hipSOLVER ?
hipSPARSE ?
rocBLAS ?
rocFFT ?
rocPRIM 39.04% <ø> (?)
rocRAND ?
rocSOLVER ?
rocSPARSE ?
Files with missing lines Coverage Δ
...ts/rocprim/rocprim/include/rocprim/type_traits.hpp 65.27% <ø> (ø)

... and 1992 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@matyas-streamhpc
matyas-streamhpc force-pushed the users/matyas-streamhpc/hipcub-cccl-3-0 branch from 89a22db to 6019c3c Compare March 23, 2026 11:49
@matyas-streamhpc
matyas-streamhpc force-pushed the users/matyas-streamhpc/hipcub-cccl-3-0 branch from 6019c3c to 555b351 Compare April 20, 2026 15:05
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been inactive for 25 days and will be marked as stale.

If you would like to keep this PR open, please:

  • Add new commits
  • Add a comment explaining why it should remain open

This PR will be automatically closed in 5 days if no further activity occurs.

@github-actions github-actions Bot added the Stale PR has no activity for 25+ days label May 16, 2026
@matyas-streamhpc
matyas-streamhpc force-pushed the users/matyas-streamhpc/hipcub-cccl-3-0 branch from 555b351 to 1441fba Compare May 19, 2026 14:36
@matyas-streamhpc
matyas-streamhpc force-pushed the users/matyas-streamhpc/hipcub-cccl-3-0 branch from 5f74f48 to 95883a9 Compare July 23, 2026 16:42
@umfranzw
umfranzw dismissed stale reviews from NguyenNhuDi and themself July 23, 2026 19:38

Dismissing old review since the issues have been addressed.

umfranzw added a commit that referenced this pull request Jul 25, 2026
Note: this is a rocm-libraries-based copy of
#4079 in case we need to make
immediate changes.

Add CCCL 3.0.x support for hipCUB library.
Additional updates: fix CUB backend
JIRA ID : EXSWSTRHPC-300

---------

Co-authored-by: Mátyás Aradi <matyas@streamhpc.com>
Co-authored-by: Nara Prasetya <nara@streamhpc.com>
Co-authored-by: Cenxuan Tian <cenxuan@streamhpc.com>
Co-authored-by: Nguyen <zenguyen@amd.com>
assistant-librarian Bot pushed a commit to ROCm/hipCUB that referenced this pull request Jul 25, 2026
feat(hipcub): Add CCCL 3.0.x support (copy)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Note: this is a rocm-libraries-based copy of
ROCm/rocm-libraries#4079 in case we need to make
immediate changes.

Add CCCL 3.0.x support for hipCUB library.
Additional updates: fix CUB backend
JIRA ID : EXSWSTRHPC-300
assistant-librarian Bot pushed a commit to ROCm/rocPRIM that referenced this pull request Jul 25, 2026
feat(hipcub): Add CCCL 3.0.x support (copy)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Note: this is a rocm-libraries-based copy of
ROCm/rocm-libraries#4079 in case we need to make
immediate changes.

Add CCCL 3.0.x support for hipCUB library.
Additional updates: fix CUB backend
JIRA ID : EXSWSTRHPC-300
assistant-librarian Bot pushed a commit to ROCm/rocThrust that referenced this pull request Jul 25, 2026
feat(hipcub): Add CCCL 3.0.x support (copy)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Note: this is a rocm-libraries-based copy of
ROCm/rocm-libraries#4079 in case we need to make
immediate changes.

Add CCCL 3.0.x support for hipCUB library.
Additional updates: fix CUB backend
JIRA ID : EXSWSTRHPC-300
@matyas-streamhpc

Copy link
Copy Markdown
Collaborator Author

Copy of PR made and modifications merged in #9931

@umfranzw

Copy link
Copy Markdown
Contributor

Closing this PR, since the modified copy (#9931) has been merged.

@umfranzw umfranzw closed this Jul 27, 2026
youlituao pushed a commit to youlituao/pytorch that referenced this pull request Jul 28, 2026
…RSION' (pytorch#188072)

# Context

Recreated pytorch#184552 from personal fork.

hipCUB is targeting to be compatible with CCCL 3.0 (ROCm/rocm-libraries#4079). This requires updating some of the CUB and hipCUB compatibility glue.

To help this transition hipCUB will be exposing `HIPCUB_CCCL_VERSION` in one of the following ROCm releases (>=7.14) (ROCm/rocm-libraries#7632), which will be bumped once hipCUB reaches parity with CCCL 3.0 and beyond.

This PR is created in anticipation for this future changes.

# Implementation

- Introduce dependency on [`libhipcxx`](https://github.com/ROCm/libhipcxx).
- Guard `FpLimits` for `c10::BFloat16` backport to pre CCCL 3.x. Numeric limits are handled by libhipcxx.
- Extend `CUB_VERSION` derivation for hipCUB. Keep old fallback for backwards compatibility. Only enable CUB V3 API once hipCUB reaches parity with CCCL 3.x.

Pull Request resolved: pytorch#188072
Approved by: https://github.com/jeffdaily
aws-kingrj pushed a commit to amazon-contributing/upstream-to-pytorch that referenced this pull request Jul 29, 2026
…RSION' (pytorch#188072)

# Context

Recreated pytorch#184552 from personal fork.

hipCUB is targeting to be compatible with CCCL 3.0 (ROCm/rocm-libraries#4079). This requires updating some of the CUB and hipCUB compatibility glue.

To help this transition hipCUB will be exposing `HIPCUB_CCCL_VERSION` in one of the following ROCm releases (>=7.14) (ROCm/rocm-libraries#7632), which will be bumped once hipCUB reaches parity with CCCL 3.0 and beyond.

This PR is created in anticipation for this future changes.

# Implementation

- Introduce dependency on [`libhipcxx`](https://github.com/ROCm/libhipcxx).
- Guard `FpLimits` for `c10::BFloat16` backport to pre CCCL 3.x. Numeric limits are handled by libhipcxx.
- Extend `CUB_VERSION` derivation for hipCUB. Keep old fallback for backwards compatibility. Only enable CUB V3 API once hipCUB reaches parity with CCCL 3.x.

Pull Request resolved: pytorch#188072
Approved by: https://github.com/jeffdaily
aws-kingrj pushed a commit to amazon-contributing/upstream-to-pytorch that referenced this pull request Jul 29, 2026
…RSION' (pytorch#188072)

# Context

Recreated pytorch#184552 from personal fork.

hipCUB is targeting to be compatible with CCCL 3.0 (ROCm/rocm-libraries#4079). This requires updating some of the CUB and hipCUB compatibility glue.

To help this transition hipCUB will be exposing `HIPCUB_CCCL_VERSION` in one of the following ROCm releases (>=7.14) (ROCm/rocm-libraries#7632), which will be bumped once hipCUB reaches parity with CCCL 3.0 and beyond.

This PR is created in anticipation for this future changes.

# Implementation

- Introduce dependency on [`libhipcxx`](https://github.com/ROCm/libhipcxx).
- Guard `FpLimits` for `c10::BFloat16` backport to pre CCCL 3.x. Numeric limits are handled by libhipcxx.
- Extend `CUB_VERSION` derivation for hipCUB. Keep old fallback for backwards compatibility. Only enable CUB V3 API once hipCUB reaches parity with CCCL 3.x.

Pull Request resolved: pytorch#188072
Approved by: https://github.com/jeffdaily
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants