[Tile] Disable STD builtins in tile mode - #11021
Conversation
The compiler generated STD builtins like `std::move` generate a `__tile__` annotation if the program im compiled in tile mode. That means that any SIMT program that moves a type that contains a type that is unsupported , e.g. `__int128_t` in tile would fail to compile.
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. 📝 WalkthroughSummary by CodeRabbit
WalkthroughTile compilation now selects CUDA standard library fallbacks for selected utilities. Tile-only tests use ChangesTile-mode compatibility
Suggested reviewers: Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
libcudacxx/include/cuda/std/__utility/move.h (1)
49-54: 🎯 Functional Correctness | 🔵 Trivial | 🏗️ Heavy liftsuggestion: Add a focused tile-mode compile regression test for these fallback selectors.
Compile calls to
as_const,forward,forward_like,move,move_if_noexcept, andaddressofwith a type containing__int128_t. The test should fail if any selector still uses the tile-annotated standard-library builtin.As per path instructions: “Add or update focused tests for tile-mode behavior rather than importing rules from unrelated subprojects.”
Also applies to: 73-78
Source: Path instructions
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 768ab591-e5a8-4acc-8863-40068837f6ed
📒 Files selected for processing (5)
libcudacxx/include/cuda/std/__memory/addressof.hlibcudacxx/include/cuda/std/__utility/as_const.hlibcudacxx/include/cuda/std/__utility/forward.hlibcudacxx/include/cuda/std/__utility/forward_like.hlibcudacxx/include/cuda/std/__utility/move.h
Included review availability: Your plan provides up to 12 included reviews per hour; 10 remain after this review.
|
As part of this PR, lets add some of the |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 8f603d12-dda3-4c93-ad3b-6dd36dfe830a
📒 Files selected for processing (9)
ci/matrix.yamlcub/test/catch2_test_device_find.culibcudacxx/test/libcudacxx/cuda/utilities/expected/expected.void/tile_only_types.pass.cpplibcudacxx/test/libcudacxx/cuda/utilities/expected/tile_only_types.pass.cpplibcudacxx/test/libcudacxx/cuda/utilities/optional/tile_only_types.pass.cpplibcudacxx/test/libcudacxx/cuda/utilities/tuple/tile_only_types.pass.cpplibcudacxx/test/libcudacxx/cuda/utilities/unexpected/tile_only_types.pass.cpplibcudacxx/test/libcudacxx/cuda/utilities/utility/pair/tile_only_types.pass.cpplibcudacxx/test/libcudacxx/cuda/utilities/variant/tile_only_types.pass.cpp
Included review availability: Your plan provides up to 12 included reviews per hour; 8 remain after this review.
| #include "test_macros.h" | ||
|
|
||
| TEST_TILE_FUNC void test() | ||
| __tile__ void test() |
There was a problem hiding this comment.
question: My understanding is this PR was meant to enable existing Thrust/CUB/libcu++ tests to build with --enable-tile. What are these __tile__ annotations for if we currently aren't supporting __tile__ annotations anywhere in CCCL?
There was a problem hiding this comment.
Those are the tests that verify that we can use the vocabulary types when tile mode is enabled.
With us disabling tile support those tests do not work anymore and there is also not TEST_TILE_FUNC anymore because that relies on our internal _CCCL_TILE which not is never defined to anything.
This slipped through because we only had the tile runs in nightly.
There was a problem hiding this comment.
The alternative would have been to either delete the tests, which is bad for internal testing or completely ifdefing out everything which is also not nice and a lot of churn
There was a problem hiding this comment.
Can we just mark them as UNSUPPORTED: *?
There was a problem hiding this comment.
I really want to avoid the chance of forgetting to reenable them
71d7b98 to
47050ca
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: b92f496a-fab7-4b23-8d68-b6c227194e29
📒 Files selected for processing (1)
ci/matrix.yaml
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
libcudacxx/test/libcudacxx/cuda/utilities/optional/tile_only_types.pass.cpp (1)
140-143: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winimportant: Make this guard active for tile test builds. With the current definition in
libcudacxx/include/cuda/std/__cccl/compiler.h,_CCCL_TILE_COMPILATION()is always0, so the calls at Lines 141-142 are never instantiated. This test can pass without compiling the optional tile-only cases.
🧹 Nitpick comments (1)
libcudacxx/test/libcudacxx/cuda/utilities/optional/tile_only_types.pass.cpp (1)
23-23: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winsuggestion: Keep the direct
__tile__annotations; do not replace them withTEST_TILE_FUNC.TEST_TILE_FUNCexpands to_CCCL_TILE, which is empty because_CCCL_TILE_COMPILATION()is hardcoded to0. Make the tile-only type and instantiations reachable in anenable-tilebuild. The current guard excludestile_only_typeand removes both calls, so this test does not exercisecuda::std::optional.Source: Coding guidelines
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 564a8abc-a7ae-4117-bcb2-a721838d90f5
📒 Files selected for processing (1)
libcudacxx/test/libcudacxx/cuda/utilities/optional/tile_only_types.pass.cpp
Included review availability: Your plan provides up to 12 included reviews per hour; 10 remain after this review.
This comment has been minimized.
This comment has been minimized.
They pull in `std::move` which NVCC detects as `__tile__` in tile mode
b1dc13a to
6d3ba3b
Compare
🥳 CI Workflow Results🟩 Finished in 1h 55m: Pass: 100%/30 | Total: 22h 03m | Max: 1h 39m | Hits: 44%/357283See results here. AI failure analysis1. cuGraph device_scalar initialization selects deleted RMM const-rvalue constructor · 1 jobExplanation: cuGraph passes temporary scalar values such as `size_t{0}` to `rmm::device_scalar`, causing overload resolution to select RMM 26.10's deleted `const value_type&&` constructor across 158 compilation units. The PR does not modify cuGraph or RMM, and the logs contain no base-branch comparison, so verify whether this is transient upstream revision incompatibility or behavior exposed by the PR's `cuda::std::move` and `forward` builtin-selection changes. Evidence: Copy this prompt into a coding agentJobs: |
|
CI run passed for tile https://github.com/NVIDIA/cccl/actions/runs/33049350290/job/98440894789?pr=11021 |
6d3ba3b to
4acbd2e
Compare
| { | ||
| const auto it = std::find_if(first, last, predicate); // not thrust::find_if because it will rely on cub::FindIf | ||
| return static_cast<OffsetT>(std::distance(first, it)); | ||
| const auto it = cuda::std::find_if(first, last, predicate); // not thrust::find_if because it will rely on cub::FindIf |
There was a problem hiding this comment.
question: Why is the switch to cuda::std:: algorithms needed throughout this PR?
Can we just keep these enabled for per-PR instead of doing it via override? |
The compiler generated STD builtins like
std::moveare__tile__annotated if the program im compiled in tile mode.That means that any SIMT program that moves a type that contains a type that is unsupported , e.g.
__int128_tin tile would fail to compile.