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 293–305

ahwStores

Full file
quad q's P, M, V and half pairs, at its offsets
293def ahwStores = (lambda unrestricted wide : Nat . (lambda unrestricted stride : Nat . (lambda unrestricted tail : (family SM86Program) .
294  (saFor wide (lambda unrestricted q : Nat . (lambda unrestricted rest : (family SM86Program) .
295    (let unrestricted pred = (ahwPredicate q) in
296    (let unrestricted wideOffset = (naturalMultiply q (naturalMultiply 16 stride)) in
297    (let unrestricted halves = (ahwHalfPairs wide q) in
298    (saPack halves (ahwValue q 1 0) (ahwValue q 0 0)
299    (saPack (succ halves) (ahwValue q 3 0) (ahwValue q 2 0)
300    (saUnless pred (constructor SM86InstructionBody SM86StoreGlobalWide (saR 6) (saR (ahwValue q 0 0)) (saU wideOffset) ahStoreControl)
301    (saUnless pred (constructor SM86InstructionBody SM86StoreGlobalWide (saR 10) (saR (ahwValue q 0 2)) (saU wideOffset) ahStoreControl)
302    (saUnless pred (constructor SM86InstructionBody SM86StoreGlobalWide (saR 12) (saR (ahwValue q 0 3)) (saU wideOffset) ahStoreControl)
303    (saUnless pred (constructor SM86InstructionBody SM86StoreGlobal64 (saR 30) (saR halves)
304      (saU (naturalMultiply q (naturalMultiply 8 stride))) ahStoreControl) rest)))))))))))
305    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.