Skip to main content

gpu_batch_input_limit

Function gpu_batch_input_limit 

Source
pub fn gpu_batch_input_limit() -> usize
Expand description

VRAM-adaptive GPU batch-input limit. Bigger buffers mean fewer device dispatches per multi-TB scan; each kernel launch is a fixed ~50-300 µs cost regardless of payload, so doubling the input halves dispatch overhead. Capped by host VRAM (input + transition tables + match output must fit) and by a 1 GiB upper bound so the pre-compile time stays bounded.

VRAM detectedInput lengthAdapter examples
>= 24 GiB1 GiBRTX 4090 / 5090, A100 / H100
12 - 23 GiB512 MiBRTX 3090, RTX 4080, M-Max
8 - 11 GiB256 MiBRTX 3080, RTX 4070, M-Pro
< 8 GiB / Unknown128 MiBiGPU, software, no-GPU CI runner

Cached on first call; the result is stable for the process lifetime so routing and cache identities stay consistent across every batch.