pub struct ConflictTracker { /* private fields */ }Expand description
A single forward pass execution context.
All ops are encoded into one CommandEncoder. Call finish
to commit the command buffer and wait for GPU completion — this is the ONLY
sync point per forward pass.
If an op returns an error, the session can be dropped without committing. The underlying command buffer is abandoned (never committed to the GPU). Tracks buffer address ranges for automatic barrier elision.
Mirrors llama.cpp’s ggml_mem_ranges — accumulates the read and write
ranges of all dispatches in the current concurrent group. When a new
dispatch’s reads overlap with an existing write (RAW), or its writes
overlap with an existing read or write (WAR/WAW), a barrier is needed.
Otherwise the dispatch can run concurrently and the barrier is elided.
Uses CPU-visible contents_ptr() addresses, which on Apple Silicon
unified memory equal the GPU addresses.