The intrinsic family Intrinsic.barrier
- 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
PTX ISA 9.5 #parallel-synchronization-and-communication-instructions-bar- Quote
Barrier synchronization.
- Lean declarations
MojoProof.LLVM.Intrinsic.ofDeclMojoProof.LLVM.IntrinsicMojoProof.Sem.intrinsic
- Corpus files
tests/corpus/gemv/gemv_f32_gevm_kernel_float32_float32_float32_1024_1308aaae.nvptx.lltests/corpus/gevm_t512/gevm_f32_t512_gevm_kernel_float32_float32_float32_512_7a789db0.nvptx.lltests/corpus/layernorm/ln_rowwise_block_t0_r1_ax0_w1_bs1024_c4d21970.nvptx.lltests/corpus/layernorm/ln_rowwise_block_t0_r1_ax0_w1_bs128_847b1b53.nvptx.lltests/corpus/layernorm/ln_rowwise_block_t0_r1_ax0_w1_bs256_762bdc07.nvptx.ll
5 kernel files (
.ll) in the corpus.- Tests
MojoProofTest.RuleMojoProofTest.CorpusMojoProofTest.Modelled
- Upstream issue
- None filed.
- Depends on
- No other card.
Rule
PTX ISA's section on the instruction NVPTX lowers it to (the quote is the section's first sentence). The importer accepts a declaration of this family only if Intrinsic.ofDecl recognizes its name and signature (Intrinsic.name, Intrinsic.sig). The semantics gives a call its meaning in MojoProof.Sem.intrinsic, and the grid completes the collective call in MojoProof.Sem.Grid.fire. MojoProofTest/Modelled.lean runs a kernel of a call (its row Intrinsic.barrier), and the run returns. The block checker (MojoProof/Sym/Rules.lean): refused: SState.stmt takes calls of special registers and of minmax only.
Corpus
53 of the 116 corpus files use it (118 uses); corpus lists the first 5 in path order. The members called: llvm.nvvm.barrier.cta.sync.aligned.all.
Out of scope
Members of the family the corpus does not call. The NVPTX backend's documentation of the NVVM intrinsics is not quoted (no local copy); that the intrinsic is the PTX instruction cited rests on reading the PTX ISA (docs/TRUST.md T7).
Open
L2 needs a recorded GPU run of a test of the construct; there is none.