verify_graph_key

Function verify_graph_key 

Source
pub fn verify_graph_key(pairs: &[(u32, u32)], wy_tables_null: bool) -> Vec<u32>
Expand description

The batched-verify CUDA-graph cache key for one batch: the (ssm slot, row count) pairs in DISPATCH order, then a wy-tables-present sentinel.

Every SSM pointer a capture bakes (h/conv state, rollback intermediates, WY table contents) is a pure function of the pair at that batch position, and the depth-run launch structure is a pure function of the depth sequence — so the key must carry both, in order. All other captured addresses (hidden/logits/scratch/meta) are fixed buffers refreshed pre-replay. The sentinel keeps a table-less capture from ever replaying a table-full step or vice versa.

Pairs arrive in the order verify_batch_order produced, so with canonicalization on the key is a pure function of (slot set, depth multiset, sentinel) — the whole point of this module.