Source/Packages

Accelerator.SM90.InstructionEncoding

packages/hardware/architectures/nvidia-sm90/src/Accelerator/SM90/InstructionEncoding.alpha

500 lines73 declarations29.3 KiBSHA-256 6893fe9ca611

constructor · lines 49–49

SM90Encoded

Full file
The sm_90 encoder and decoder of Accelerator.SM90.Instruction. The encoder lays each operand into its field from the typed instruction and REFUSES an operand its field cannot hold. The decoder reads the fields back and then re-encodes them: it accepts a word only when that reproduces every one of its 128 bits, so a word with a stray modifier, a reserved bit or an unknown size code is refused as non-canonical instead of being read as something it is not. Hence encode (decode w) = w for every word the decoder accepts, by construction; the converse, decode (encode x) = x, is what the round-trip laws of tests/Proof/SM90InstructionEncodingLaws.alpha pin instance by instance. Field layouts (bit numbers of the 128-bit word; nvdisasm -hex's first 64-bit value is bits 0..63): LDG opcode 0x981 | Rd 16..23 | Ra 24..31 | UR 32..37 (URZ, 63) | offset 40..62 | .E 72 | size 73..75 | fixed 0x0c1e0000 at 64 STG opcode 0x986 | Ra 24..31 | Rv 32..39 | offset 40..62 | UR 64..69 (URZ) | .E 72 | size 73..75 | fixed 0x0c100000 at 64 (LDG and STG: bits 77..79 set for .STRONG.GPU, clear for the weak form -- ptxas -arch=sm_90a's ld/st.relaxed.gpu, scratchpad probe reference/oracles/nvidia-sm90-ptxas/global-branch/strong.sass) LDGSTS opcode 0xfae | Rs 16..23 | Rg 24..31 | source offset 32..43 | shared offset 44..63 (both signed) | UR 64..69 (URZ) | 0x0b900c40 at 64 BRA opcode 0x947 | displacement bits 2..9 at 16..23 and 10..57 at 34..81 | fixed 0x03800000 at 64 (bits 87..89) REDG opcode 0x9a6 | Ra 24..31 | Rv 32..39 | offset 40..62 | UR 64..69 (URZ) | descriptor flag 71 (clear) | .E 72 | fixed 0x0c10f33f at 64 (.ADD.F32.FTZ.RN.STRONG.GPU) with the guard at 12..15 and the scheduling control at 105..125 for all (Accelerator.SM90.Word). The size code is 4 for 32 bits, 5 for 64 and 6 for 128 (measured: ptxas -arch=sm_90a, reference/oracles/ nvidia-sm90-ptxas/global-branch/global.sass). The descriptor flag, bit 76, is clear in all three global forms: that is the raw form.
49constructor SM90Encoded

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.