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 262–269

ahwLoads

Full file
bank b of every quad, under SB b; the first waits for the last iteration's stores' reads
262def ahwLoads = (lambda unrestricted wide : Nat . (lambda unrestricted stride : Nat . (lambda unrestricted tail : (family SM86Program) .
263  (saFor (naturalMultiply 4 wide) (lambda unrestricted i : Nat .
264    (let unrestricted b = (naturalDivideUnchecked i wide) in (let unrestricted q = (naturalModuloUnchecked i wide) in
265      (saUnless (ahwPredicate q)
266        (constructor SM86InstructionBody SM86LoadGlobalWide (saR (ahwValue q 0 b)) (saR (naturalAdd 6 (naturalMultiply 2 b)))
267          (saU (naturalMultiply q (naturalMultiply 16 stride)))
268          (saCtl (ahwBankBarrier b) (naturalSelect i saWaitNone saWait5)))))))
269    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.