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
{{ message }}
Repository navigation
Execute Widen and legacy decimal reads on the GPU #11284
GPU reads of two kinds of decimal data fail, one today and one once CD5 lands, because the reader returns an array that CUDA cannot execute. The CPU fallback only runs when every buffer is on the host, so a device read errors instead of falling back (vortex-cuda/src/executor.rs).
1. Widen has no CUDA kernel
After CD5, every DecimalByteParts array with a narrow MSP reads from a file with an integer Widen as its MSP, so a GPU read of such a column fails with "CPU fallback with device-resident buffers is not supported". A kernel for vortex.widen fixes it: it extends the child into a new buffer at the logical width (sign extension for signed integers and decimals, zero extension for unsigned integers) and keeps the validity. A decimal Widen can reuse the kernels in vortex-cuda/kernels/src/decimal_cast.cu. CD5 can't merge before this part.
2. Legacy vortex.decimal nodes fail on the GPU
Since #10995, a legacy vortex.decimal node, stored at a width other than the canonical width of its precision, is read through WidenArray::from_stored_decimal, which scans the values to pick the precision of the Widen child. The read plugin is synchronous and has no CUDA stream, so it can't scan a device buffer and fails with "Decimal storage at a noncanonical width must be in host memory, got device memory" (vortex-array/src/arrays/widen/encode/decimal.rs). A CUDA session can register its own vortex.decimal reader instead, since ArraySession::register replaces the reader with the same ID, and that reader can reuse the kernel from part 1. CD5 doesn't depend on this part.
Open question: should the CUDA reader trust the stored precision and sign-extend to the canonical width on the device, as canonical reads already trust it, or scan on the device? Narrowing storage that is wider than the canonical width needs either that trust or an overflow check.
ok were going to hard error on this and fix this later in the cuda executor for decimal
Activity
connortsui20 commentedon Nov 5, 2026
#10995 (comment)
[-]Fix legacy decimal read on GPU[/-][+]Execute `Widen` and legacy decimal reads on the GPU[/+]Keep the DecimalByteParts benchmarks and record the GPU legacy read in …
Execute Widen arrays on CUDA