Source/Packages

Realization.Nvidia.SM86.AttentionHeadLayoutSM86

packages/realizations/cooperative/nvidia-sm86/src/Realization/Nvidia/SM86/AttentionHeadLayoutSM86.alpha

1,710 lines162 declarations85.3 KiBSHA-256 ad8cef82929b

def · lines 1517–1522

attentionHeadLayoutSM86InverseRotatePlaneAdmitted

Full file
The pullback uses the transpose of the forward rotation: negating sine lets the same checked two-component rotation express it. Its source is a head-major f32 gradient plane; the destination is the matching slice of the token-major projection gradient. Q and K writes are disjoint.
1517def attentionHeadLayoutSM86InverseRotatePlaneAdmitted =
1518  (lambda unrestricted seq : Nat . (lambda unrestricted heads : Nat .
1519    (lambda unrestricted projectionWidth : Nat . (lambda unrestricted planeOffset : Nat .
1520      (naturalAnd
1521        (attentionHeadLayoutSM86RotatePlaneAdmitted seq heads projectionWidth planeOffset)
1522        (naturalLessOrEqual (naturalMultiply heads (naturalMultiply seq 256)) 4294967295))))))

The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.