Skip to content

[FEA] Add LTO scalar reductions - #7

Closed
lamarrr wants to merge 1 commit into
reduce-1-shared-udffrom
reduce-2-scalar
Closed

lamarrr wants to merge 1 commit into
reduce-1-shared-udffrom
reduce-2-scalar

Conversation

@lamarrr

@lamarrr lamarrr commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

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

Description

Add cudf::reduce_lto for fused reductions over multiple columns, broadcast scalars and user data. Callbacks initialize, filter, update, merge and finalize state; each requested output is returned as an independent single-row column.

Kernel specialization uses the physical schema. Callback symbol routing is compiled and cached separately, so changing entry-point names reuses the kernel fragment. The implementation supports optional values/state, decoded dictionary inputs, string state and copied string outputs, and propagates callback errors.

This PR contains common reduction reflection, allocation and device machinery that segmented reduction reuses. Its tests include fused SQL examples, nulls, predicates, errors, supported inputs, wide optional state, empty state/output lists and separate memory resources.

Validation

The five affected suites passed: 1,571 tests. The final stack passed all 122 CTest entries; CUDA memcheck reported zero errors across all 27 scalar/segmented LTO tests. 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: 2/4. Depends on #6. Base: reduce-1-shared-udf.
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