Source/Packages

Realization.Nvidia.SM86.StreamingAttentionSM86

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

1,129 lines205 declarations66.1 KiBSHA-256 aefcbc3b00ca

def · lines 348–358

saLoopTail

Full file
---- the loop's tail: the next key tile, one fewer left ----
348def saLoopTail = (lambda unrestricted seq : Nat . (lambda unrestricted bodyInstructions : Nat .
349  (saAddImm saKeyOffset saKeyOffset (naturalMultiply saTile (naturalMultiply saHeadWidth saHalfBytes))
350  (saAddImm saValueOffset saValueOffset (naturalMultiply saTile saHalfBytes)
351  (saAddImm saCount saCount 4294967295
352  (saGreater saP1 saCount 0
353  (saWhen saP1
354    (constructor SM86InstructionBody SM86Branch
355      (saU (naturalSaturatingSubtract 4294967296 (naturalMultiply 16 (naturalAdd bodyInstructions 5))))
356      (sm86Unsigned32 (byte 255) (byte 255) (byte 131) (byte 3))
357      saPlain)
358    sm86ProgramEmpty)))))))

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.