Enable GPU replay of prebuilt libcu++ lit tests - #10575
Conversation
|
/ok to test af4814c |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
af4814c to
d9c4c14
Compare
|
/ok to test d9c4c14 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
/ok to test ca40e94 |
⏱️ CCCL compile-time benchmark comparison: Public headers compile-time benchResult: 1 regression row(s), 2 improvement row(s) above threshold.
Artifacts: reports and traces Direct file processing
🔴 Direct file processing — Regressions
🟢 Direct file processing — Improvements
|
miscco
left a comment
There was a problem hiding this comment.
I believe this is too complicated
In lit there is a final test step that removes the build artifacts: inside of _evaluate_pass_test
We can simply add a flag to disable the removal when running in CI
Disabling removal of the executables is exactly what this PR already does. But that is far from sufficient. The build and test jobs run on different runners. We need to package those executables as an artifact to download and run them on the GPU runners without having to rebuild them. |
📝 WalkthroughSummary by CodeRabbit
WalkthroughChangesThe test harness now supports build and replay modes for preserved libcudacxx executables. Linux and Windows CI producer jobs upload artifacts when consumers exist. Consumer jobs download the artifacts and run replay tests. libcudacxx CI artifact flow
Suggested reviewers: ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
Comment |
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: b68987f0-08b5-4a46-ae82-11f3a70fe61b
📒 Files selected for processing (8)
ci/build_libcudacxx.shci/test_libcudacxx.shci/upload_libcudacxx_test_artifacts.shci/windows/build_libcudacxx.ps1ci/windows/test_libcudacxx.ps1libcudacxx/test/libcudacxx/CMakeLists.txtlibcudacxx/test/utils/libcudacxx/test/config.pylibcudacxx/test/utils/libcudacxx/test/format.py
Yeah, I'm fine with the lit changes including the mode flag. It's the external logic to package the artifacts up that needs to stick around. |
😬 CI Workflow Results🟥 Finished in 11h 25m: Pass: 99%/504 | Total: 4d 14h | Max: 1h 03m | Hits: 80%/917673See results here. AI failure analysis1. NVRTC program destruction segfaults in custom segmented-reduce test · 1 jobExplanation: The custom-type segmented-reduce test crashes while destroying the NVRTC program after successfully compiling and retrieving its LTO IR. This prevents the Windows CTK 13.3/MSVC 14.50 HostJIT test suite from completing, while the remaining tests continue to pass. Evidence: CCCL C Parallel v2 (HostJIT) nvcc MSVC / [CTK13.3 MSVC14.50] Test(amd64, RTX2080), step 4 Root cause: The decisive failure occurs at the `nvrtcDestroyProgram(&prog)` call after `nvrtcGetLTOIR` succeeds. The logs contain no native stack trace, so they cannot distinguish an NVRTC 13.3/MSVC interaction from earlier memory corruption; the PR diff only changes libcudacxx test-artifact replay and does not touch this test path, making an unrelated toolchain/test flake likely. Sources: c/parallel/test/test_util.h:110, c/parallel/test/test_segmented_reduce.cpp:359, c/parallel/test/test_segmented_reduce.cpp:405. Suggested next steps: First rerun only this test on the same Windows CTK 13.3/MSVC 14.50 configuration with `ctest --test-dir build/cccl-c-parallel-v2 -R "^cccl.c.parallel.v2.test.segmented_reduce$" --output-on-failure`. If reproducible, capture a native crash stack and reduce the operation source to a standalone NVRTC create/compile/get-LTOIR/destroy sequence before changing CCCL code. Copy this prompt into a coding agentJobs: |
Description
Today, libcu++ lit testing is split between build and test jobs. The build job compiles the tests. The test job compiles them again, relying on sccache to avoid actual recompilation. Even with a 100% cache hit rate, there is still cost in requesting every compilation artifact from sccache.
This PR keeps the build job responsible for compilation, then packages and uploads the resulting executables. The test job downloads and runs those executables directly instead of invoking the compiler and relying on sccache.
Motivation
To test this idea, I ran all 3,769 libcu++ lit tests locally using CUDA 13.3, GCC15, and SM86. Even with a 100% cloud sccache hit rate, compiling and running normally took
18m10son the GPU runner. Precompiling the executables took15m47soff-GPU, and replaying them took8m05son the GPU, reducing GPU runner time by10m05s(55%).CI results show the same improvement. All jobs below ran 3,769 tests with
-j8, CUDA 13.3, GCC15, and C++20.13m37s27m42s30m14s34m19s39m10sThe median normal job took
32m17s. Replay took13m37s, reducing GPU job time by18m40s(58%).