For contributors — how this works internally. This page describes the state of
multi-GPU support in the codebase, not a feature you can turn on today.
hash_join_v2, WCOJ, and the factorized routes documented elsewhere in the
Architecture tab.
Two terms used below:
- WCOJ — worst-case-optimal join, a join method that computes multiway patterns (triangles, cycles) directly instead of through a chain of pairwise joins.
- Free Join — a related join method that generalizes WCOJ.
- Factorized routes — join paths that keep intermediate results in a compressed, factored form rather than fully expanded. These single-GPU routes have been available since 0.10.0.
What Exists
Thexlog-cuda crate contains a MultiGpuMemoryManager substrate. It wraps a
GpuDevicePool and builds one GpuMemoryManager per device. It supports:
- device-count inspection;
- allocation on a specified device;
- round-robin allocation on the next device;
- per-device remaining-byte reporting;
- access to the underlying device pool.
What Does Not Exist Yet
The repository does not currently ship:- a distributed relation buffer type for query execution;
- partitioning kernels that route rows by hash key across devices;
- peer-to-peer shuffle orchestration for joins;
- distributed hash-join execution;
- cross-device WCOJ or Free Join;
- optimizer costing for multi-GPU partition plans.
Design Direction
A future distributed hash join would likely use hash partitioning. The sketch is:- compute a partition for each row from the join key;
- move left and right partitions to the same device;
- run the normal local join kernel per device;
- concatenate or expose the partitioned result as a distributed relation.
- skew handling for hot keys;
- memory budgeting across devices;
- peer-to-peer versus host-mediated copies;
- deterministic result ordering or explicit unordered semantics;
- relation-generation and cache invalidation across devices;
- fallback behavior when only one GPU is present.