-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
cudfcudf related - GPU accelerationcudf related - GPU accelerationenhancementNew feature or requestNew feature or request
Description
Problem
When running Presto TPC-DS queries with cuDF backend enabled, the EnforceSingleRow operator falls back to CPU
execution because no GPU implementation exists. This operator appears 26 times across TPC-DS queries at SF100.
Related to #15772 (tracking issue for missing cuDF operators in TPC-DS)
Description
EnforceSingleRow is a simple operator that validates input produces at most one row and throws an exception if more
than one row is detected. It's commonly used in scalar subqueries.
TPC-DS Queries Affected
Queries using EnforceSingleRow (27 total occurrences across these queries):
- Q6 (1 occurrence) ✓
- Q9 (15 occurrences) - fails due to unrelated NestedLoopJoin issue
- Q14 (3 occurrences) ✓
- Q24 (1 occurrence) ✓
- Q44 (2 occurrences) ✓
- Q54 (2 occurrences) ✓
- Q58 (3 occurrences) ✓
Implementation Approach
The GPU implementation (CudfEnforceSingleRow) should:
- Accept GPU input and produce GPU output (maintain GPU pipeline continuity)
- Check row count on GPU using cuDF table APIs
- Throw
VeloxUserErrorif row count > 1 - Pass through the single row unchanged
- Include a config flag
cudf.enable_enforce_single_rowto allow toggling for performance measurement
Performance Characteristics
Based on benchmarks SF100 data with PR #16357, the GPU implementation shows comparable performance to CPU (±5%
variance), which is expected given:
- The operator is lightweight (just a row count check)
- Typical input is 0-1 rows
- The benefit is avoiding GPU↔CPU transfers in the operator pipeline, not faster execution of the check itself
Implementation Status
-
CudfEnforceSingleRowimplementation - Unit tests (
EnforceSingleRowTest.cpp) - Integration with operator adapter registry
- Configuration support (
cudf.enable_enforce_single_row) - PR submitted (will link once created)
Related Work
- Tracking issue: [cuDF] Expand GPU operator support for Presto TPC-DS #15772
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
cudfcudf related - GPU accelerationcudf related - GPU accelerationenhancementNew feature or requestNew feature or request