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 561–567

sqProducts

Full file
accumulators = A (4-register fragments from `a`) x the B fragments, slice by slice; the first product waits on `first`, each slice after on SB2
561def sqProducts = (lambda unrestricted accumulator : (pi unrestricted nt : Nat . Nat) . (lambda unrestricted a : Nat .
562  (lambda unrestricted first : Nat . (lambda unrestricted tail : (family SM86Program) .
563    (saFor 4 (lambda unrestricted k : Nat .
564      (saFor 8 (lambda unrestricted nt : Nat .
565        (saHmma (accumulator nt) (naturalAdd a (naturalMultiply k 4)) (saB k nt) saSB2
566          (naturalSelect (naturalIsZero nt) (naturalSelect (naturalIsZero k) first saWait2) saWaitNone)))))
567      tail)))))

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.