Commit d14cd0c
fix(cudf): Enable GPU execution for count(*), count(column), and count(NULL) (facebookincubator#16522)
Summary:
Enable the cuDF GPU code-path for all count aggregation variants:
count(*), count(column), count(constant), and count(NULL).
Previously, global count(*) fell back to CPU because its zero-column
intermediate representation loses row counts in cuDF.
- Support zero-column global count(*) on GPU by preserving row counts
through FilterProject and CudfConversion.
- Classify count inputs (column, count-all, null-constant) to handle
each variant correctly in both groupby and global reduce paths.
- Handle count(NULL) on GPU, returning 0 for all groups/globally.
- Non-count constant aggregates (e.g. sum(1)) fall back to CPU by
design.
Tests:
- Re-enable previously disabled countStarGlobal test.
- Add parameterized tests for all count variants across single,
partial+final, and partial+intermediate+final steps, for both
global and group-by, with and without nulls.
- Add selection tests verifying GPU/CPU routing for zero-column
count(*), count(NULL), and sum(1).
Fixes facebookincubator#16492
Pull Request resolved: facebookincubator#16522
Reviewed By: peterenescu
Differential Revision: D98979967
Pulled By: bikramSingh91
fbshipit-source-id: 2efa92c86fb30d25fcd785ff05f443d57e9a4c1a1 parent 084f222 commit d14cd0c
File tree
7 files changed
+562
-88
lines changed- velox/experimental/cudf
- exec
- tests
7 files changed
+562
-88
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
251 | 264 | | |
252 | 265 | | |
253 | 266 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| 249 | + | |
249 | 250 | | |
250 | 251 | | |
251 | 252 | | |
252 | 253 | | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
253 | 257 | | |
254 | 258 | | |
255 | 259 | | |
256 | 260 | | |
257 | | - | |
| 261 | + | |
258 | 262 | | |
259 | 263 | | |
260 | 264 | | |
| |||
263 | 267 | | |
264 | 268 | | |
265 | 269 | | |
266 | | - | |
| 270 | + | |
267 | 271 | | |
268 | 272 | | |
269 | 273 | | |
| |||
0 commit comments