← Back to Pull requests

[STF] clang-tidy fixes in code the tidy job does not see (CTK 13+ and math-library blocks) #12813

Closed
unknown closed this pull request without merging on Nov 25, 2026 19:55 UTC
View on GitHub
unknown unknown commented on Nov 25, 2026 17:52 UTC
Author

Description

The clang-tidy job has covered places and STF since #11626 / #11642, but two kinds of code are still invisible to it:

  • code under _CCCL_CTK_AT_LEAST(13, x): the job builds against CUDA 12.9 (clang_preview-cuda is an alias of 12.9 in ci/matrix.yaml), so that code is preprocessed away;

  • the cuBLAS / cuSOLVER blocks of __stf/utility/cuda_safe_call.cuh, under __has_include: the tidy image does not ship the math libraries.
  • A local run of the all-tidy preset with clang-tidy 22 against a CUDA 13 toolkit, over all places and STF translation units of the tidy job, reports 13 unique findings, all in such code. This PR fixes the semantics-preserving ones:

    | Check | Count | Where |
    |---|---|---|
    | cccl-hide-from-abi | 3 | cuda_safe_call.cuh: _CCCL_HOST_API, as on the sibling status_traits specialisations |
    | readability-identifier-naming | 1 | cuda_safe_call.cuh: local X-macro, suppressed with the reason the file already uses |
    | modernize-loop-convert | 2 | test/stf/graph/graph_child_move_ownership.cu |
    | misc-const-correctness | 1 | test/places/data_place_alloc.cu |
    | readability-math-missing-parentheses | 1 | test/stf/places/locality_domain_split_method.cu |
    | readability-isolate-declaration | 1 | test/stf/places/locality_domain_split_method.cu |

    No functional change.

    Left out on purpose, for follow-ups:

  • bugprone-unused-return-value on three cudaGraphAddNode calls in the graph tests (wrapping them in cuda_safe_call changes behaviour on error);

  • two findings in libcudacxx headers (cuda/__algorithm/copy.h, cuda/__driver/driver_api.h);

  • the math-library tests and examples (cudax_ENABLE_CUDASTF_MATHLIBS is off in the tidy preset).
  • Note that the tidy job of this PR cannot see the fixed lines either (CUDA 12.9, no math libraries); the cudax build jobs compile them.

    Checklist


  • I am familiar with the Contributing Guidelines.

  • New or existing tests cover these changes.

  • The documentation is up to date with these changes.
  • 🤖 Generated with Claude Code

    Diff: 270 lines (+202 / -68) across 3 files Reviewer: davebayer Review duration: 122m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.39) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 270 lines diff across 3 files
    0.39
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.335
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #12813"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 39.4% (MEDIUM) · Higher = larger blast radius
    39.4%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.6% · Safe to merge
    15.6%
    Repository