Fix racecheck in segmented_offset_bitmask_binop kernel - #23897
Conversation
|
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 (1)
Included review availability: Your plan provides up to 12 included reviews per hour; 10 remain after this review. 📝 WalkthroughSummary by CodeRabbit
Walkthrough
ChangesNull mask bitmask operation
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This localized kernel change replaces the reduction implementation to address the reported racecheck issue without changing the intended behavior; no actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.) ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Description
Fixes a racecheck in the
segmented_offset_bitmask_binoplibcudf kernel. This was found in the weekly compute-sanitizer run: https://github.com/NVIDIA/cudf/actions/runs/33247027974/job/99086397670#step:5:3039The race
compute-sanitizerdetects is a real shared-memory hazard: withincg::reduce'shierarchical reduction tree (e.g., 8 warps → 4 → 2 → 1), one level writes partial sums to shared memory and the next level reads them. The CG library uses__syncthreads()internally to order these, butcompute-sanitizerracecheck operates at a warp granularity — it sees one warp writing shared memory and another warp reading that same location, and flags it as a race because the__syncthreadsbarrier is between those two events but racecheck's memory access tracking can fire before the barrier is resolved in its model.The solution employed here replaces the CG calls with equivalent CUB
BlockReducecalls instead which seems to makecompute-sanitizerhappy. The benchmarks showed no performance regressions with the modified code.Checklist