You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of umbrella #100 (velox_cudf_adapter_operator_test).
AdapterOperatorTest.streamingFullPartitionCountSpillsActivePartition and AdapterOperatorTest.streamingRangeSumSpillsActivePeer expect CudfWindow::testingStreamingSpillWrites() >= 3 (GPU table written as Parquet under the task spill directory). On current dev both see 1 write. Query results are still correct.
These cases feed three tiny Values batches and cap the streaming window at 1 byte so the still-open partition / RANGE peer must spill on each addInput, then replay from disk.
Root cause
Values stays on CPU. CudfFromVelox buffers until velox.cudf.gpu_batch_size_rows (default 100000) or noMoreInput(). Six rows never hit that threshold, so CudfWindow receives one coalesced GPU batch after end of input and spills only the trailing group.
The tests were added in #20 when Values was still replaced by CudfValues (one GPU batch per Values vector). After GPU operators were reconciled with upstream, that replacement went away and the spill counts collapsed to 1.
This is not HMB / host-memory spill. spillActiveRows() writes Parquet to the task spill directory.
Expected behavior
With a 1-byte active-row cap and three input batches:
full-partition COUNT spills the still-open k=1 partition on each add, then replays so every k=1 row sees count 4;
multi-column RANGE SUM spills the still-open peer (a=10, b=5) on each add, then replays so the peer sum stays 6 and the following running sum stays 10;
testingStreamingSpillWrites() >= 3 and testingStreamingSpillCleanups() == 1.
Acceptance criteria
Keep each Values batch as its own GPU input in these two tests (velox.cudf.gpu_batch_size_rows=1).
Both spill tests pass, including disk-spill write/cleanup counters.
The rest of velox_cudf_adapter_operator_test still passes.
Validation
Reproduced and verified on HPDA dev28798f623 (CUDA SM 86):
unfixed: both tests actual: 1 vs 3;
fixed: the two spill tests pass, and the full binary is 18/18.
Highlight (by human-in-loop)
Problem
Part of umbrella #100 (
velox_cudf_adapter_operator_test).AdapterOperatorTest.streamingFullPartitionCountSpillsActivePartitionandAdapterOperatorTest.streamingRangeSumSpillsActivePeerexpectCudfWindow::testingStreamingSpillWrites() >= 3(GPU table written as Parquet under the task spill directory). On currentdevboth see 1 write. Query results are still correct.These cases feed three tiny
Valuesbatches and cap the streaming window at 1 byte so the still-open partition / RANGE peer must spill on eachaddInput, then replay from disk.Root cause
Valuesstays on CPU.CudfFromVeloxbuffers untilvelox.cudf.gpu_batch_size_rows(default 100000) ornoMoreInput(). Six rows never hit that threshold, soCudfWindowreceives one coalesced GPU batch after end of input and spills only the trailing group.The tests were added in #20 when
Valueswas still replaced byCudfValues(one GPU batch per Values vector). After GPU operators were reconciled with upstream, that replacement went away and the spill counts collapsed to 1.This is not HMB / host-memory spill.
spillActiveRows()writes Parquet to the task spill directory.Expected behavior
With a 1-byte active-row cap and three input batches:
COUNTspills the still-openk=1partition on each add, then replays so everyk=1row sees count 4;RANGE SUMspills the still-open peer(a=10, b=5)on each add, then replays so the peer sum stays 6 and the following running sum stays 10;testingStreamingSpillWrites() >= 3andtestingStreamingSpillCleanups() == 1.Acceptance criteria
velox.cudf.gpu_batch_size_rows=1).velox_cudf_adapter_operator_teststill passes.Validation
Reproduced and verified on HPDA
dev28798f623(CUDA SM 86):actual: 1 vs 3;Prepared with assistance from Cursor.