E6019
E6019 — raw::barrier() anywhere but a top-level statement of the lowering body. The barrier's contract requires every lane to reach it; under a conditional or a loop that cannot be guaranteed syntactically, so it is rejected outright (conservative by design — restructure the body so the barrier is unconditional).
What the compiler reports
E6019
reachable by every lane
The fragments the test suite holds the compiler to. An ellipsis marks text the test does not constrain; the emitted message also carries a source location.
A program that triggers it
// raw::barrier() under a loop: every lane must reach a barrier, and inside
// control flow that cannot be guaranteed syntactically. Rejected outright.
Topology Dev {
memory: Memory::L2,
visible: [Memory::L2, Memory::SMEM],
transfer Memory::CPU_DRAM -> Memory::L2 : 10 GB/s,
transfer Memory::L2 -> Memory::SMEM
}
impl Transfer<Memory::L2, Memory::SMEM> for Topology::Dev {
fn move_tile(src: &Tensor<f32, [4]>, dst: &mut Tensor<f32, [4]>) -> i32 {
for i in 0..raw::extent(src) {
raw::store(dst, i, raw::load(src, i));
raw::barrier();
}
return 0;
}
}
fn main() -> i32 {
return 0;
}
From tests/middle_end/fail/raw_barrier_divergent.vx, which asserts this diagnostic on every commit.
Related
Topologies and memoryThe chapter covering the rule this code enforces.
All diagnosticsEvery code the compiler can emit, grouped by stage.
E6018A
raw:: bounds obligation (0 <= index < extent) that could not be proven. Prove it with a loop bound or invariant the SMT prover can see, or assert it in an unsafe block — which records the obligation as asserted-not-proven, the same standing an unverified spec: figure has.
E6020raw::async_copy in a lowering for an edge no declared topology equips with a copy engine. The capability lives in the machine file (transfer A -> B copy_engine); using an absent primitive is a compile error, not a fallback.