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§
- Indirect
Dispatch - Command-buffer indirect dispatch source.
- Output
Binding Layout - Readback and allocation metadata for one writable buffer.
- Output
Layout - Output readback layout derived from a program’s declared output range.
- Tail
Mask Policy - 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_countup to the next power of two. Returns aTailMaskPolicythat the lower/emit layer consumes to insert alane_id < original_countpredicate 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_bytesagainst materialized readback buffers. - find_
indirect_ dispatch - Locates the single
Node::IndirectDispatchin 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.