Roadmap / The GPU model

Address spaces

address spaces, the generic, global, shared and local spaces of a pointer

Area
The GPU model
Kind
construct
Level
L1 (modelled in Lean). Next: L2 needs a recorded GPU run (a conformance test, not a proof).
Evidence present above the level
None above the level.
Reference
LLVM NVPTXUsage 24.0.0git #address-spaces
Quote
No quote yet.
Lean declarations
  • MojoProof.Sem.Block.space
  • MojoProof.LLVM.Global.addrSpace
  • MojoProof.Sem.Layout.allocaSpace
Corpus files
None yet.

0 kernel files (.ll) in the corpus.

Tests
  • MojoProofTest.Eval
Upstream issue
None filed.
Depends on
No other card.

The rule. NVPTX numbers its address spaces: 0 generic, 1 global, 3 shared, 4 constant, 5 local. A pointer's type carries its space, and addrspacecast converts between them.

In Lean. Every memory block has a space (MojoProof.Sem.Block.space); a global variable has one (LLVM.Global.addrSpace), and the data layout gives the space of alloca (Layout.allocaSpace).

Out of scope. The constant space's caching, and distributed shared memory.

Open. L2: no recorded GPU run. L3: the proved kernels (vadd, vmul) use generic pointers only. Ref: quote to be added.