The atomicrmw instruction
- Area
- LLVM IR constructs
- 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 LangRef 24.0.0git #atomicrmw-instruction- Quote
The ‘atomicrmw’ instruction is used to atomically modify memory.
- Lean declarations
MojoProof.LLVM.Parser.instMojoProof.LLVM.InstMojoProof.Sem.execMojoProof.Sem.rmw
- Corpus files
tests/corpus/reduction/reduction_reduction_sum_kernel_SIMD_DTy6A6AcB6A6AcB_950d42eb4d93545d.nvptx.ll
1 kernel file (
.ll) in the corpus.- Tests
MojoProofTest.RuleMojoProofTest.CorpusMojoProofTest.Modelled
- Upstream issue
- None filed.
- Depends on
- No other card.
Rule
LangRef's section on atomicrmw (the quote is the first sentence of its overview). The importer reads atomicrmw as Inst.atomicrmw (Parser.inst); the semantics gives it a meaning in MojoProof.Sem.exec, with MojoProof.Sem.rmw. MojoProofTest/Modelled.lean runs a kernel of it (its row atomicrmw), and the run returns. The block checker (MojoProof/Sym/Rules.lean): refused: SState.stmt has no case for it.
Corpus
1 of the 116 corpus files use it (1 uses).
Out of scope
Forms of the instruction the corpus does not use are read by the same parser case, but no corpus file exercises them. That the semantics gives atomicrmw the meaning LLVM gives it rests on reading LangRef (docs/TRUST.md T7), not on a check against LLVM.
Open
L2 needs a recorded GPU run of a test of the construct; there is none.