Fix CuTe tuple protocol compatibility across CCCL versions - #3386
Open
xiufanl wants to merge 3 commits into
Open
Fix CuTe tuple protocol compatibility across CCCL versions#3386xiufanl wants to merge 3 commits into
xiufanl wants to merge 3 commits into
Conversation
ccecka
reviewed
Jul 14, 2026
| return f(cute::get<I>(static_cast<T&&>(t))...); | ||
| } else { | ||
| return f(get<I>(static_cast<T&&>(t))...); | ||
| } |
Contributor
There was a problem hiding this comment.
Would much rather implement CuTe's own integer_sequence and/or fix this overload properly than WAR it and require this repetition everywhere.
Contributor
Author
There was a problem hiding this comment.
Thanks - agreed. I replaced the per-call branching with a CuTe-owned integer_sequence and adapted the configured STL make_integer_sequence result into it. Since the associated namespace is now cute, the original unqualified get calls work without colliding with newer cuda::std::get, so tuple_algorithms.hpp is back to its direct ADL path. I also kept the focused transform/fold coverage and added a type-ownership assertion.
xiufanl
force-pushed
the
codex/cute-cccl-tuple-compat
branch
2 times, most recently
from
July 15, 2026 10:38
dfbbe14 to
8c97b17
Compare
Use CCCL's public tuple entry point during NVRTC compilation while preserving fallback declarations for older header layouts. Give CuTe its own integer_sequence type and adapt the configured STL generator into it. This prevents newer CCCL integer_sequence get overloads from entering ADL, keeps the original tuple algorithm path, and adds transform and fold regression coverage.
xiufanl
force-pushed
the
codex/cute-cccl-tuple-compat
branch
from
July 15, 2026 19:36
8c97b17 to
1061020
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Recent CCCL versions no longer provide the private
cuda/std/__tuple_dir/structured_bindings.haggregation header, while older CCCL layouts do not always expose the tuple protocol primary declarations through the newer split headers. CuTe's NVRTC path needs to support both layouts.Newer CCCL versions also provide
cuda::std::getforinteger_sequence. When CuTe aliases that type directly, its associated namespace brings the newer overload into unqualified lookup and conflicts with CuTe's tuple protocol.Changes
cuda/std/tupleentry point for NVRTC compilation.integer_sequenceand adapt the configured STLmake_integer_sequenceresult into it.getpath; ordinary tuple-like ADL remains unchanged, while CuTe integer sequences no longer associate with the CCCL namespace.Compatibility
Testing
test/unit/cute/core/tuple.cpp.git diff --checkpasses; full CUDA validation is pending on the updated commit.