Source/Packages

Realization.Nvidia.SM86.AdamWHalfSM86

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

428 lines73 declarations26.3 KiBSHA-256 9692515bc485

def · lines 139–155

ahSidePrologueWith

Full file
A side warp's prologue (GroupedLaunchSM86.sm86ProgramWithSideWarps): the CTA's threads past its first `first` run the update beside the program the first run. Its block is the CTA's linear index over a grid `gridX` wide (CTA y in R26), of `threads` side threads (thread tid - first); the elements a thread takes are the standalone image's for that T, so each element's update is the same instructions on the same words.
139def ahSidePrologueWith = (lambda unrestricted scaled : Nat . (lambda unrestricted first : Nat .
140  (lambda unrestricted threads : Nat . (lambda unrestricted gridX : Nat .
141  (lambda unrestricted iterations : Nat . (lambda unrestricted tail : (family SM86Program) .
142  (saS2R 0 (constructor SM86SpecialRegister SM86ThreadIdX)
143  (saS2R 1 (constructor SM86SpecialRegister SM86CooperativeThreadArrayIdX)
144  (saS2R 26 (constructor SM86SpecialRegister SM86CooperativeThreadArrayIdY)
145  (saMovImm 3 16
146  (saMovImm 4 8
147  (saMovImm ahCounter iterations
148  (ahChoose scaled
149    (saMovConst 14 (saArgument adamWHalfSM86ScaleArgument)
150    (saMovConst 15 (naturalAdd (saArgument adamWHalfSM86ScaleArgument) 4)
151    (saOp (constructor SM86InstructionBody SM86LoadGlobal (saR 18) (saR 14) (saU 0) (saCtl saSB4 saWaitNone))
152      (ahStateLoads (ahScalarsRange 1 6 (saMovImmAfter 5 0 (naturalAdd saWait5 saWait4)
153        (ahPendingOrExit (ahSideThread first threads gridX tail))))))))
154    (ahStateLoads (ahScalarsRange 0 6 (saMovImmAfter 5 0 (naturalAdd saWait5 saWait4)
155      (ahPendingOrExit (ahSideThread first threads gridX 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.