Source/Packages

Realization.Nvidia.SM86.GatedGELUSM86

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

170 lines18 declarations7.4 KiBSHA-256 fe6a7ec05912

def · lines 70–80

ggForwardElement

Full file
---- forward ---- R4:R5 up, R6:R7 gate, R8:R9 gelu, R10:R11 gated; R14, R15 up; R16, R17 gate; R22 s, R23 c, R24 h, R25 1; element e's temporaries from 26 + 4e; R38, R39 gelu; R40, R41 up gelu; R42 their half pair
70def ggForwardElement = (lambda unrestricted e : Nat . (lambda unrestricted tail : (family SM86Program) .
71  (let unrestricted x = (naturalAdd 16 e) in (let unrestricted t = (naturalAdd 26 (naturalMultiply 4 e)) in
72  (saFmul t x x (naturalSelect e saWaitNone saWait0)
73  (saFmul (naturalAdd t 1) t x saWaitNone
74  (ggFfma (naturalAdd t 2) (naturalAdd t 1) 23 x
75  (saFmul (naturalAdd t 2) (naturalAdd t 2) 22 saWaitNone
76  (ggTanh (naturalAdd t 3) (naturalAdd t 2)
77  (saFadd (naturalAdd t 3) (naturalAdd t 3) 25 saWait1
78  (saFmul (naturalAdd t 3) (naturalAdd t 3) 24 saWaitNone
79  (saFmul (naturalAdd 38 e) x (naturalAdd t 3) saWaitNone
80  (saFmul (naturalAdd 40 e) (naturalAdd 14 e) (naturalAdd 38 e) saWaitNone 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.