[libcu++] Add cuda::std::tuple debugger pretty-printers - #10534
Conversation
|
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 (3)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughSummary by CodeRabbit
WalkthroughAdds GDB and LLDB pretty-printers for Changescuda::std::tuple debugger support
Assessment against linked issues
Possibly related PRs
Suggested reviewers: 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: 868a58cc-7b7d-4d64-96c0-470f7abd8f6e
📒 Files selected for processing (9)
libcudacxx/share/libcudacxx/gdb/__init__.pylibcudacxx/share/libcudacxx/gdb/tuple.pylibcudacxx/share/libcudacxx/lldb/__init__.pylibcudacxx/share/libcudacxx/lldb/tuple.pylibcudacxx/test/debugging/CMakeLists.txtlibcudacxx/test/debugging/tuple/CMakeLists.txtlibcudacxx/test/debugging/tuple/gdb.expectedlibcudacxx/test/debugging/tuple/lldb.expectedlibcudacxx/test/debugging/tuple/source.cu
263a6ef to
7a7f8e2
Compare
…formatting Add EBCO-first/last/adjacent, pointer, and nested-empty tuple test cases, and register an explicit lldb type summary so tuples render consistently instead of falling back to LLDB's default heuristic.
a337ec7 to
4a0c459
Compare
|
@griwes I tried to build and test with lldb >= 22 and C++20, but it didn't pass. With lldb <= 21, all tests pass. The error may be related to the LLVM issue mentioned in this PR: llvm/llvm-project#207704 |
|
/ok to test 5e71b28 |
Jacobfaib
left a comment
There was a problem hiding this comment.
Thanks for the contribution!
This comment has been minimized.
This comment has been minimized.
|
@Jacobfaib The [CTK13.3 GCC15 C++20] Test(amd64, H100 2-GPU): sm{90} job seems to have failed due to a runner issue - the log cuts off mid-run with all tests passing (2858/3769), the raw log returns BlobNotFound. Could you re-trigger CI. Thanks |
🥳 CI Workflow Results🟩 Finished in 23h 41m: Pass: 100%/68 | Total: 16h 34m | Max: 49m 39s | Hits: 99%/318204See results here. |
* [libcu++] Add cuda::std::tuple debugger pretty-printers * [libcu++] Test more cuda::std::tuple edge cases and fix lldb summary formatting Add EBCO-first/last/adjacent, pointer, and nested-empty tuple test cases, and register an explicit lldb type summary so tuples render consistently instead of falling back to LLDB's default heuristic. * [libcu++] Fix lldb tuple type name and empty-tuple summary
Description
closes #10086
Add
gdbandlldbpretty-printers forcuda::std::tuple, following the existingcuda::buffer/cuda::mrprinter pattern (libcudacxx/share/libcudacxx/{gdb,lldb}/).Without a pretty-printer, a cuda::std::tuple prints as its raw internal layout (_base, __tuple_leaf<N, T, ...>, _value, ...). With this change, printing a tuple shows its public type and element values directly, e.g.:
cuda::std::tuple<int, double, char> = {
[0] = 42,
[1] = 3.14,
[2] = 'x'
}
Handles: nested tuples (recurses automatically), empty tuples (cuda::std::tuple<>, whose _base member can be entirely elided from debug info by both GCC and Clang), empty non-final element types using the empty-base-class optimization, reference elements (dereferenced instead of printed as a bare address), const-qualified tuples, and tuples nested inside other containers (e.g. std::vector<cuda::std::tuple<...>>).
Tests are added under libcudacxx/test/debugging/tuple/, following the same harness as the existing buffer/memory_resource debugging tests, including a print, mutate, print case to confirm the formatter reflects live state rather than a cached value.
Checklist