ViT forward-graph pieces — the flat ↔ Mat bridges #
The ch10 token layer's ViT den helpers (StableHLO.Basic) are local re-spellings; this file
ties them back to the proven Attention forms for the forward-graph faithfulness proofs
(ViTMultiHead, ViTDepthK): each den helper applied to a Mat.flatten is the flatten of
the Mat-level op, and patchEmbedF_x_den is the patch-embed stage every ViT forward-graph
faithfulness proof starts from.
Flat ↔ Mat commutation bridges #
Each ch10 den helper applied to a Mat.flatten is the flatten of the
corresponding Mat-level op (the Mat.unflatten_flatten round-trip
cancels); the pointwise ops (scaleF/geluF/addV) commute with
flattening definitionally. Public — ViTChainClose reuses them to tie
the matmul-spelled SDPA backward to the proven closed forms.
The patch-embed stage over the image operand %x, in the Mat.flatten (Mat.unflatten …) form
the block den_aux lemmas take — stage 0 of every ViT forward-graph faithfulness proof.