Skip to content

Pretty printers maintenance - #10686

Open
Jacobfaib wants to merge 7 commits into
NVIDIA:mainfrom
Jacobfaib:jacobf/2026-08-06/pretty-printers-maint
Open

Pretty printers maintenance#10686
Jacobfaib wants to merge 7 commits into
NVIDIA:mainfrom
Jacobfaib:jacobf/2026-08-06/pretty-printers-maint

Conversation

@Jacobfaib

@Jacobfaib Jacobfaib commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Description

  1. Tighten timeout for pretty printers
  2. Compile them all in optimized mode
  3. Properly handle printing references (previously this wouldn't match the printers, now it does)
  4. Don't need to go up a frame to inspect values, we can just do it inside the function itself but then we need to inline the asm() call
  5. Unify some of the repeated boilerplate code

Checklist

  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@Jacobfaib Jacobfaib self-assigned this Aug 6, 2026
@Jacobfaib
Jacobfaib requested a review from a team as a code owner August 6, 2026 12:57
@github-project-automation github-project-automation Bot moved this to Todo in CCCL Aug 6, 2026
@cccl-authenticator-app cccl-authenticator-app Bot moved this from Todo to In Review in CCCL Aug 6, 2026
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes

    • Improved CUDA pretty-printer handling of reference-qualified values in GDB and LLDB.
    • Corrected type recognition and displayed values for atomic, buffer, complex, event, stream, vector, memory-resource, array, and tuple types.
    • Standardized debugger output with consistent addresses, reference qualifiers, and object formatting.
  • Tests

    • Pretty-printer tests now run with optimized settings and shorter timeouts.
    • Simplified test case configuration and strengthened output normalization for more reliable debugger validation.

Walkthrough

Pretty-printer implementations now handle reference-valued CUDA types in GDB and LLDB. Debugger tests use optimized builds, simplified case arguments, shorter timeouts, and expanded output normalization.

Changes

Debugger case execution and build configuration

Layer / File(s) Summary
Case parsing and debugger execution
libcudacxx/test/debugging/CMakeLists.txt, libcudacxx/test/debugging/run_pretty_printer_test.py
Cases now use breakpoint, section, and expression values. GDB and LLDB no longer select caller frames. Breakpoint grouping and output normalization were updated.
GDB reference normalization
libcudacxx/share/libcudacxx/gdb/*
GDB pretty-printers strip references from types and values before type matching, value extraction, and field inspection.
LLDB reference normalization
libcudacxx/share/libcudacxx/lldb/*
LLDB pretty-printers dereference reference values and canonicalize types before summaries, synthetic providers, and handle inspection.
Optimized debugger fixtures
libcudacxx/test/debugging/*
Test sources use KEEP_FOR_DEBUGGER. Case wiring and LLDB expectations now match direct expressions, optimized execution, addresses, and reference formatting.

Possibly related PRs

  • NVIDIA/cccl#10520: Directly modifies stream pretty-printers and their associated tests.

Suggested reviewers: bernhardmgruber, davebayer


Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
libcudacxx/test/debugging/CMakeLists.txt (1)

165-168: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

suggestion: Update the helper documentation for the new build mode.

The documentation for libcudacxx_add_pretty_printer_test still says that targets have host debug information and disabled optimization. The implementation now requests -O3 and NDEBUG, and removes explicit -g. Update that contract after restoring debug information. (raw.githubusercontent.com)

Source: MCP tools


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 7b8d6e00-ac46-4d8c-a952-ac04b6fa0a24

📥 Commits

Reviewing files that changed from the base of the PR and between fef5a52 and 5b80f36.

📒 Files selected for processing (1)
  • libcudacxx/test/debugging/CMakeLists.txt

Comment thread libcudacxx/test/debugging/CMakeLists.txt
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@Jacobfaib
Jacobfaib requested a review from a team as a code owner August 6, 2026 14:25

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
libcudacxx/test/debugging/run_pretty_printer_test.py (1)

528-530: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

suggestion: Add regression tests for > > >, quoted text containing 42u, addresses, and suffixed integers. Run the targeted pretty-printer test with the repository CMake/Ninja preset and run pre-commit run --all-files before merge.

As per path instructions, files under libcudacxx/test follow .agent/skills/cccl-test/SKILL.md, and changes require targeted validation and pre-commit checks.

Source: Path instructions


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 055a8252-208d-4627-b6ff-b77c39e5d8c6

📥 Commits

Reviewing files that changed from the base of the PR and between 5cd42f0 and ca7c287.

📒 Files selected for processing (1)
  • libcudacxx/test/debugging/run_pretty_printer_test.py

Comment thread libcudacxx/test/debugging/run_pretty_printer_test.py
Comment thread libcudacxx/test/debugging/run_pretty_printer_test.py
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@Jacobfaib
Jacobfaib force-pushed the jacobf/2026-08-06/pretty-printers-maint branch from 88fc073 to 5ffd62b Compare August 6, 2026 16:17

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 3542af87-4774-4126-884a-e537f0257eb2

📥 Commits

Reviewing files that changed from the base of the PR and between ca7c287 and 88fc073.

📒 Files selected for processing (42)
  • libcudacxx/share/libcudacxx/gdb/atomic.py
  • libcudacxx/share/libcudacxx/gdb/buffer.py
  • libcudacxx/share/libcudacxx/gdb/complex.py
  • libcudacxx/share/libcudacxx/gdb/event.py
  • libcudacxx/share/libcudacxx/gdb/inplace_vector.py
  • libcudacxx/share/libcudacxx/gdb/memory_resource.py
  • libcudacxx/share/libcudacxx/gdb/std_array.py
  • libcudacxx/share/libcudacxx/gdb/tuple.py
  • libcudacxx/share/libcudacxx/lldb/atomic.py
  • libcudacxx/share/libcudacxx/lldb/buffer.py
  • libcudacxx/share/libcudacxx/lldb/complex.py
  • libcudacxx/share/libcudacxx/lldb/event.py
  • libcudacxx/share/libcudacxx/lldb/inplace_vector.py
  • libcudacxx/share/libcudacxx/lldb/memory_resource.py
  • libcudacxx/share/libcudacxx/lldb/std_array.py
  • libcudacxx/share/libcudacxx/lldb/tuple.py
  • libcudacxx/test/debugging/CMakeLists.txt
  • libcudacxx/test/debugging/array/CMakeLists.txt
  • libcudacxx/test/debugging/array/lldb.expected
  • libcudacxx/test/debugging/array/source.cu
  • libcudacxx/test/debugging/atomic/CMakeLists.txt
  • libcudacxx/test/debugging/atomic/lldb.expected
  • libcudacxx/test/debugging/atomic/source.cu
  • libcudacxx/test/debugging/buffer/CMakeLists.txt
  • libcudacxx/test/debugging/buffer/lldb.expected
  • libcudacxx/test/debugging/buffer/source.cu
  • libcudacxx/test/debugging/complex/CMakeLists.txt
  • libcudacxx/test/debugging/complex/lldb.expected
  • libcudacxx/test/debugging/complex/source.cu
  • libcudacxx/test/debugging/event/CMakeLists.txt
  • libcudacxx/test/debugging/event/lldb.expected
  • libcudacxx/test/debugging/event/source.cu
  • libcudacxx/test/debugging/inplace_vector/CMakeLists.txt
  • libcudacxx/test/debugging/inplace_vector/lldb.expected
  • libcudacxx/test/debugging/inplace_vector/source.cu
  • libcudacxx/test/debugging/memory_resource/CMakeLists.txt
  • libcudacxx/test/debugging/memory_resource/lldb.expected
  • libcudacxx/test/debugging/memory_resource/source.cu
  • libcudacxx/test/debugging/run_pretty_printer_test.py
  • libcudacxx/test/debugging/tuple/CMakeLists.txt
  • libcudacxx/test/debugging/tuple/lldb.expected
  • libcudacxx/test/debugging/tuple/source.cu
🚧 Files skipped from review as they are similar to previous changes (1)
  • libcudacxx/test/debugging/CMakeLists.txt

Comment thread libcudacxx/share/libcudacxx/gdb/memory_resource.py Outdated
Comment thread libcudacxx/share/libcudacxx/lldb/atomic.py Outdated
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@miscco miscco left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks o much better

@Jacobfaib
Jacobfaib requested a review from miscco August 7, 2026 16:13
@Jacobfaib
Jacobfaib force-pushed the jacobf/2026-08-06/pretty-printers-maint branch from 18fd5f8 to 7444848 Compare August 7, 2026 18:35
@Jacobfaib
Jacobfaib enabled auto-merge (squash) August 7, 2026 18:35
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

⏱️ CCCL compile-time benchmark comparison: Public headers compile-time bench

Result: 6 regression row(s), 2 improvement row(s) above threshold.

Run Value
Config public-headers-gcc13
Baseline origin/main
Preset all-dev
Targets cub.headers.base, thrust.cpp.cuda.headers.base, libcudacxx.test.public_headers
GPU / launch args rtx2080 / --cuda 13.3 --host gcc13

Artifacts: reports and traces

Direct file processing

-f file-processing exclusive --sort total

🔴 Direct file processing — Regressions
Rank Regression impact Selected Δ Baseline Current Event Matched traces
1 0.961435 0.961435 20.036825 20.998260 Processing Header File: libcudacxx/include/cuda/__device/physical_device.h 94
2 0.749965 0.749965 10.916407 11.666372 Processing Header File: libcudacxx/include/cuda/std/__iterator/concepts.h 437
3 0.308120 0.308120 11.491588 11.799708 Processing Header File: libcudacxx/include/cuda/std/__type_traits/type_list.h 477
4 0.263980 0.263980 5.674576 5.938556 Processing Header File: libcudacxx/include/cuda/std/__iterator/iterator_traits.h 464
5 0.252777 0.252777 1.872785 2.125562 Processing Header File: cub/cub/device/dispatch/tuning/tuning_scan.cuh 68
6 0.229325 0.229325 2.913285 3.142610 Processing Header File: libcudacxx/include/cuda/std/__ranges/concepts.h 405
🟢 Direct file processing — Improvements
Rank Improvement impact Selected Δ Baseline Current Event Matched traces
1 1.350740 -1.350740 9.915596 8.564856 Processing Header File: libcudacxx/include/cuda/std/__cccl/prologue.h 550
2 0.387724 -0.387724 3.412547 3.024823 Processing Header File: libcudacxx/include/cuda/std/__cccl/epilogue.h 550

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

🥳 CI Workflow Results

🟩 Finished in 2h 24m: Pass: 100%/68 | Total: 1d 02h | Max: 57m 54s | Hits: 98%/306720

See results here.

AI failure analysis

1. Merged RAPIDS environment requests incompatible rapids-logger versions · 1 job

Explanation: The RAPIDS build stops before compilation because its generated Conda environment simultaneously requires rapids-logger 0.2.x and 0.3.x. The PR's debugger changes are not reached or implicated by the failure.

Evidence:

Build RAPIDS (optional) / rmm ucxx kvikio rapidsmpf cudf cudf_kafka, step 6

2026-08-07T18:38:42.1008703Z - rapids-logger==0.2.*,>=0.0.0a0
2026-08-07T18:38:42.1009044Z - rapids-logger==0.3.*,>=0.0.0a0
2026-08-07T18:39:16.4634196Z error    libmamba Could not solve for environment specs

Root cause: Dependency files from the selected main-branch RAPIDS repositories were merged into one environment while different repositories required mutually exclusive rapids-logger minor versions. The log does not retain enough attribution to determine which generated per-repository environment supplied each constraint. Sources: .github/workflows/build-rapids.yml:66, ci/rapids/post-create-command.sh:38, ci/rapids/cuda13.3-conda/devcontainer.json:90.

Suggested next steps: Inspect the generated per-repository Conda YAML files to identify the sources of the 0.2.x and 0.3.x constraints, then align those downstream dependencies or temporarily pin the affected RAPIDS repository to a compatible commit. Reproduce narrowly with `RAPIDS_LIBS='rmm ucxx kvikio rapidsmpf cudf cudf_kafka' .devcontainer/launch.sh -d -c 13.3 -H rapids-conda -- ./ci/rapids/rapids-entrypoint.sh /bin/bash -li -c 'build-all -j0 -v'`.

Copy this prompt into a coding agent
Repository: https://github.com/NVIDIA/cccl
Workflow run: https://github.com/NVIDIA/cccl/actions/runs/31207630862
Failure group: Merged RAPIDS environment requests incompatible rapids-logger versions
Affected jobs:
- Build RAPIDS (optional) / rmm ucxx kvikio rapidsmpf cudf cudf_kafka: https://github.com/NVIDIA/cccl/actions/runs/31207630862/job/92962684267

Reproduce the RAPIDS environment-generation failure for `rmm ucxx kvikio rapidsmpf cudf cudf_kafka` using the CUDA 13.3 RAPIDS Conda devcontainer. Before Conda solves the merged environment, inspect every generated per-repository YAML and identify exactly which repository requests `rapids-logger==0.2.*` and which requests `rapids-logger==0.3.*`. Verify the intended rapids-logger version for the pinned 26.10 RAPIDS stack, then implement the smallest fix: preferably align the outdated downstream dependency; if that cannot be changed here, pin the drifting repository through the appropriate `RAPIDS_<lib>_GIT_REPO` workflow variable to a mutually compatible commit. Confirm that the regenerated merged environment contains only one compatible rapids-logger constraint, run the focused environment creation/build command, and avoid changing the unrelated debugger-printer code.

Jobs:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

2 participants