Skip to content

WAVE Specification

The WAVE specification defines the instruction set architecture, binary encoding format, memory model, and execution semantics for the WAVE GPU compute model.

The v0.3 specification is the current stable version of the WAVE ISA. It resolves encoding issues present in earlier versions and establishes the canonical instruction format used by all WAVE tooling.

Key changes from v0.2:

  • Modifier field widened to 4 bits. The 3-bit modifier field from v0.2 was insufficient to encode all instruction variants. v0.3 expands it to 4 bits, supporting up to 16 modifier values per opcode.
  • Flags field reduced from 3 bits to 2 bits. Two flags were removed:
    • WAVE_REDUCE_FLAG — now handled by dedicated wave operation opcodes.
    • NON_RETURNING_ATOMIC_FLAG — now encoded via the modifier field on atomic instructions.
  • Canonical register encoding: 5-bit register fields encoding 32 general-purpose registers (r0r31).
  • 4-bit modifier enables fine-grained instruction variants (e.g., memory ordering, rounding mode, comparison predicate).

Instruction word layout (v0.3, 32-bit base format):

BitsFieldWidth
31–24Opcode8
23–20Modifier4
19–18Flags2
17–13Dst (rd)5
12–8Src1 (rs1)5
7–3Src2 (rs2)5
2–0Reserved3

Extended format instructions append a second 32-bit immediate word.

Each version of the specification covers the following sections:

  1. Introduction — purpose, scope, design principles, and relationship to other standards.
  2. Execution Model — thread hierarchy, identifiers, core resources, execution guarantees, and dispatch.
  3. Register Model — general-purpose registers, sub-register access, register pairs, special registers, and predicate registers.
  4. Memory Model — memory spaces, local/device memory details, memory ordering, and atomic operations.
  5. Control Flow — structured control flow, uniform branches, divergence/reconvergence, and per-wave state.
  6. Instruction Set — integer, bitwise, floating-point, type conversion, comparison, memory, atomic, wave, synchronization, control flow, and MMA instructions.
  7. Capability System — required constants, optional capabilities, MMA parameters, and query mechanism.
  8. Binary Encoding — base and extended instruction formats, opcode map.
  9. Conformance — required behavior, implementation-defined behavior, undefined behavior, and conformance testing.