Skip to content

[libcu++] Skip fabric status decoding when a shared_memory_barrier wait has no report - #12131

Merged
pciolkosz merged 3 commits into
NVIDIA:mainfrom
SUKUNA-AI:fix/shared-memory-barrier-no-report-decode
Oct 23, 2026
Merged

pciolkosz merged 3 commits into
NVIDIA:mainfrom
SUKUNA-AI:fix/shared-memory-barrier-no-report-decode

Conversation

@SUKUNA-AI

@SUKUNA-AI SUKUNA-AI commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Description

closes #12130

operation_status::get_error_count() and for_each_error() called the device-side fabric status decoder even when the completed wait produced no report. On a GeForce RTX 5070 Ti (sm_120) with driver 617.42 (CUDA 13.4), cudaFabricOpErrorStatusCount() returns cudaErrorNotSupported, so __verify_fabric_status() trapped although there was nothing to decode.

With this change, __error_count() returns 0 without calling the decoder when there is no report. When a report is present nothing changes: classify() (which requires a report) and the decoding of real error reports still go through the driver.

Testing (local RTX 5070 Ti, CUDA 13.4, WSL2, gcc 16):

  • With shared_memory_barrier.pass.cpp un-waived locally, the test fails before this change and passes after it.
  • All 28 cuda/barrier lit tests pass.
  • compute-sanitizer racecheck and memcheck are clean on the test.
  • compute-sanitizer synccheck reports Missing wait on this test both before and after the change. A plain inline-PTX kernel gets the same report as soon as its mbarrier is initialized with layout::v1 (clean with layout v0), so this looks like a compute-sanitizer 2026.3 issue that is unrelated to this change.

The test stays waived in this PR: as described in #11935, older CI drivers cannot load its module.

Checklist

@copy-pr-bot

copy-pr-bot Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: NVIDIA/cccl
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: 9f6ed13
  • Layers: Repository YAML
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: dd2eed6b-f234-4d13-a9de-ada454c2aa0b
📥 Commits

Reviewing files that changed from the base of the PR and between d95ea5e and 8936c00.

📒 Files selected for processing: 1
  • libcudacxx/include/cuda/__barrier/shared_memory_barrier.h

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • Barrier status now reports zero errors when a completed wait has no report.
    • When a report is present and includes fabric error information, the error count is decoded as before.

operation_status::__error_count now returns zero without invoking the fabric status decoder when no report is present. When a report is present and its source encodes fabric errors, the method continues to decode the error count.

Changes: Shared memory barrier status

Layer / File(s) Summary
Guard fabric status decoding
libcudacxx/include/cuda/__barrier/shared_memory_barrier.h
operation_status::__error_count returns zero without decoding fabric status when no report is present.

Assessment against linked issues

Objective Addressed Explanation
[#12130] No-report waits return zero errors without invoking the fabric-status decoder. ✅
[#12130] for_each_error() does not invoke the callback when no report is present. ❓ The supplied change summary describes __error_count, but does not describe the callback path.

Possibly related issues

  • NVIDIA/cccl#12130: The change skips fabric-status decoding when no report is present, addressing the reported decoder failure.

Suggested reviewers: fbusato

Priority: ➖ Normal

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 8936c

No concrete merge-blocking risk remains in the reviewed change.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

…report

operation_status::get_error_count() and for_each_error() called the
device-side fabric status decoder even when the completed wait produced
no report. On a GeForce RTX 5070 Ti (sm_120) with driver 617.42
(CUDA 13.4), cudaFabricOpErrorStatusCount() returns
cudaErrorNotSupported, so __verify_fabric_status() trapped although
there was nothing to decode.

Return 0 without calling the decoder when there is no report.
@SUKUNA-AI
SUKUNA-AI force-pushed the fix/shared-memory-barrier-no-report-decode branch from a2fd7ec to c9b0e2a Compare October 21, 2026 18:31
@pciolkosz

Copy link
Copy Markdown
Contributor

/ok to test c9b0e2a

@copy-pr-bot

copy-pr-bot Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

/ok to test c9b0e2a

@pciolkosz, there was an error processing your request: E2

See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/

@pciolkosz pciolkosz 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.

Good catch! I think I assumed someone would call has_report() first, but I think doesn't hurt to check it again in the status checks

@pciolkosz

Copy link
Copy Markdown
Contributor

/ok to test c9b0e2a

@github-actions

This comment has been minimized.

@SUKUNA-AI

Copy link
Copy Markdown
Contributor Author

The only failing job here, cub.test.device.radix_sort_runs_on.lid_0 in the sm86-only build, is unrelated to this PR: on main that test aborts in any single-architecture build because it passes RunsOn a compute capability that was not compiled for. Details in #12154, fix in #12155.

@pciolkosz

Copy link
Copy Markdown
Contributor

/ok to test d95ea5e

@github-actions

This comment has been minimized.

@SUKUNA-AI

Copy link
Copy Markdown
Contributor Author

Thanks for the review! The only failure in the last run was clang-tidy in cudax/test/coop/group/make_group.cu (unrelated to this PR), which #12184 fixed on main after the previous merge. I merged main again (8936c00), so a new /ok to test should come back green.

@pciolkosz

Copy link
Copy Markdown
Contributor

/ok to test 8936c00

@github-actions

Copy link
Copy Markdown
Contributor

🥳 CI Workflow Results

🟩 Finished in 1h 52m: Pass: 100%/228 | Total: 3d 05h | Max: 1h 51m | Hits: 99%/629481

See results here.

@pciolkosz
pciolkosz merged commit 4811a1c into NVIDIA:main Oct 23, 2026
256 checks passed
@github-project-automation github-project-automation Bot moved this from In Review to Done in CCCL Oct 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

wmaxey pushed a commit that referenced this pull request Oct 26, 2026
…report (#12131) (#12228)

operation_status::get_error_count() and for_each_error() called the
device-side fabric status decoder even when the completed wait produced
no report. On a GeForce RTX 5070 Ti (sm_120) with driver 617.42
(CUDA 13.4), cudaFabricOpErrorStatusCount() returns
cudaErrorNotSupported, so __verify_fabric_status() trapped although
there was nothing to decode.

Return 0 without calling the decoder when there is no report.



(cherry picked from commit 4811a1c)

Co-authored-by: Ilya Koryaev <ilyakoryaev@yandex.ru>
Co-authored-by: SUKUNA-AI <180781973+SUKUNA-AI@users.noreply.github.com>
Co-authored-by: pciolkosz <pciolkosz@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[BUG]: shared_memory_barrier status inspection traps on GeForce sm_120: cudaFabricOpErrorStatusCount returns cudaErrorNotSupported

2 participants