I added a CUDA path to my query engine last month. It was supposed to be the fast lane. It mostly was not.
The engine is a small columnar SQL engine in C++20. Parquet in, a SQL subset out. The GPU path covers one thing: global float aggregates. SUM and AVG over a single column, off by default, behind QE_ENABLE_CUDA=ON.
The hardware is a laptop RTX 3050, 4 GB VRAM, running under WSL2. Not a datacentre card. That matters, and it is the whole point: the GPU I actually own is the one I measured.
Why aggregates first: they are the easiest win on paper. One column in, one number out. No joins, no sorting, no branching. A reduction is the textbook GPU problem.
It did not work out that way. At 1M rows the GPU is roughly tied with the CPU. The transfer costs about what the faster math saves. The column has to cross PCIe to the card, get reduced, and the answer has to come back. On a small table the bus eats the win.
At 10M rows it is relatively worse, not better. The problem is not the reduction.…