← Back to Pull requests

[cub] Use item terminology consistently in DeviceHistogram #11918

Open
unknown opened this pull request with 255 lines diff across 3 files
View on GitHub
unknown unknown commented on Oct 07, 2026 15:05 UTC
Author

Why

DeviceHistogram currently uses both “pixel” and “item” for the same logical unit: one interleaved input record containing one sample per channel. That makes the distinction between an input record and an individual channel sample harder to follow, especially in policy fields such as items_per_thread.

This cleanup standardizes the terminology before the histogram privatization work is upstreamed. “Item” means one logical interleaved input record, while “sample” remains one channel value.

What changed

  • Rename internal and public-facing DeviceHistogram identifiers from pixel terminology to item terminology.

  • Apply the same rename to the C Parallel v1 and v2 APIs and implementations, plus the Python Cython binding and type stub.

  • Clarify the CUB API documentation: num_items counts interleaved multi-channel records, and the input therefore contains NumChannels * num_items individual samples.

  • Keep sample terminology unchanged where code refers to an individual channel value.

  • Restore the declaration-column alignment in the affected documentation snippets.

  • Preserve behavior: this is a mechanical naming and documentation change with no algorithm or layout changes.
  • Validation

  • Targeted pre-commit checks for every changed file passed.

  • A fresh native-SM100 C++20 build on B200 with CUDA 13.3 and GCC 13.3 compiled the basic, API, deprecated custom-policy, environment, and environment API DeviceHistogram targets.

  • All 13 selected CUB CTest entries passed, including the six basic small/large-memory entries and all host, graph, and device-launch environment cases.

  • A fresh C Parallel v1 build passed cccl.c.parallel.test.histogram: 304 assertions in 11 test cases.

  • A fresh C Parallel v2 build compiled cccl.c.parallel.v2.test.histogram. Its runtime test is blocked on this SM100 host because the pinned host-JIT LLVM emits PTX 8.5 for SM100, while SM100 requires PTX 8.6; that pre-existing toolchain limitation is unrelated to these identifier-only changes.

  • git diff --check passed.
  • Diff: 255 lines (+191 / -64) across 3 files Reviewer: bernhardmgruber Review duration: 15322m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.39) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 255 lines diff across 3 files
    0.39
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    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
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.332
    Real PR Conversation Timeline
    1 comments
    "Review active on #11918"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% 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.1% (MEDIUM) · Higher = larger blast radius
    39.1%
    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: 46.7% · Lower = rushed or shallow review
    46.7%
    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: 20.8% · Safe to merge
    20.8%
    Repository