Skip to content

[FEA] Add LTO segmented reductions - #8

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

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

Conversation

@lamarrr

@lamarrr lamarrr commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

Superseded by NVIDIA#25032, part of the draft stack targeting NVIDIA/cudf.

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 #7. Base: reduce-2-scalar.
The first base, reduce-stack-base, pins the tested upstream commit 48848df0dac. Merge and restack in order.

Checklist

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

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant