Skip to main content

Module program_walks

Module program_walks 

Source
Expand description

Pure vyre_foundation::ir::Program analysis shared by all backends. Pure IR walks over vyre_foundation::ir::Program shared by all backends.

Structs§

IndirectDispatch
Command-buffer indirect dispatch source.
OutputBindingLayout
Readback and allocation metadata for one writable buffer.
OutputLayout
Output readback layout derived from a program’s declared output range.
TailMaskPolicy
Result of coercing a logical element count up to the next power of two.

Functions§

auto_grid
Infer a grid size for a program based on its largest statically-known non-shared binding and its workgroup size.
coerce_to_pow2_with_tail_mask
N6: round element_count up to the next power of two. Returns a TailMaskPolicy that the lower/emit layer consumes to insert a lane_id < original_count predicate around each store. Pure arithmetic; no I/O.
dispatch_element_count
Derive the dispatch element count from a binding plan.
dispatch_element_count_for_program
Derive the dispatch element count from a binding plan and Program body.
dispatch_param_words
Build per-buffer element-count parameter words for a dispatch.
dispatch_param_words_into
Build per-buffer element-count parameter words into caller-owned storage.
element_size_bytes
Fixed scalar element size in bytes for DataType.
enforce_actual_output_budget
Enforces DispatchConfig::max_output_bytes against materialized readback buffers.
find_indirect_dispatch
Locates the single Node::IndirectDispatch in a program, if any.
infer_dispatch_grid
Infer a concrete workgroup grid from a program ABI and dispatch inputs.
infer_dispatch_grid_for_count
Infer a launch grid for a known logical element count and workgroup shape.
output_binding_layout
Per-output binding layout for a single declared output buffer.
output_binding_layouts
All output-buffer binding layouts for program, in declaration order.
output_binding_layouts_into
Write output-buffer binding layouts into caller-owned storage.
output_layout_from_program
Derive output readback layout for a program.
try_coerce_to_pow2_with_tail_mask
Fallible N6 power-of-two dispatch-grid coercion.
try_dispatch_param_words
Build per-buffer element-count parameter words for a dispatch with fallible host-staging allocation.
try_dispatch_param_words_into
Build per-buffer element-count parameter words into caller-owned storage with explicit allocation and ABI-width errors.