Skip to content

[FEA] Add LTO segmented reductions - #25032

Closed
lamarrr wants to merge 1 commit into
NVIDIA:lamarrr/reduce-2-scalarfrom
lamarrr:reduce-3-segmented
Closed

lamarrr wants to merge 1 commit into
NVIDIA:lamarrr/reduce-2-scalarfrom
lamarrr:reduce-3-segmented

Conversation

@lamarrr

@lamarrr lamarrr commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Superseded by #25038, layer 3 of registered GitHub native stack #25040. The replacement keeps this PR's latest content and ready/draft status. This PR retains its original review history.

Description

Add cudf::segmented_reduce_lto, reusing the scalar reduction compilation and callback machinery. Every callback receives the segment ID. Results are independent single-row columns ordered by segment and output.

Provide regular segmented execution, including splitting long segments, and a small-group executor for short segments. An unknown maximum-length hint uses regular execution. Cache the device SM count in the existing context for launch sizing.

Tests cover empty/nonzero segment boundaries, filtering, strings, small and large segments, stream propagation, and errors in a later segment through small-group, regular and split-segment execution. JIT source files are explicitly registered for incremental builds.

Validation

The five affected suites passed: 1,579 tests. All 27 LTO tests passed CUDA memcheck with zero errors. The final stack passed all 122 CTest entries. CUDA 13.3.73, Release, sm_86, RTX A6000.

Stack

  1. Shared LTO UDF infrastructure
  2. Scalar reductions
  3. Segmented reductions
  4. Benchmark comparisons

This PR: 3/4. Depends on #25031. Current base: lamarrr/reduce-2-scalar.

Head branches live in lamarrr/cudf. Upstream lamarrr/reduce-* branches mirror predecessor commits to provide GitHub PR bases.

Merge into main in order: after each predecessor lands, restack its successor onto main and retarget that PR to main before merging. Keep base mirrors synchronized with their fork heads while reviewing updates.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@copy-pr-bot

copy-pr-bot Bot commented Nov 3, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

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

Labels

CMake CMake build issue libcudf Affects libcudf (C++/CUDA) code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant