Skip to main content

apply_dynamic_batch

Function apply_dynamic_batch 

Source
pub(crate) fn apply_dynamic_batch(module: &mut Module)
Expand description

Apply --dynamic-batch: for every storage-buffer global variable whose type is an Array (the common WGSL pattern), wrap it in a rank-2+ Tensor type with the first dimension set to Symbolic("batch").

This is a best-effort transformation: it only affects storage buffers (both read-only and read-write), leaving uniforms and other address spaces untouched.