E6020
E6020 —raw::async_copyin 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.
What the compiler reports
E6020
copy_engine
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
// Capability, not choice: no declared topology edge carries `copy_engine`,
// so raw::async_copy has no hardware to run on and is refused.
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 {
raw::async_copy(dst, src, 0);
raw::async_wait();
raw::barrier();
return 0;
}
}
fn main() -> i32 {
return 0;
}
From tests/middle_end/fail/raw_async_no_engine.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.
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).
E6021A violation of the async/synchronization discipline in a lowering body: a destination read while an async_copy into it is still outstanding, a body that ends with copies no async_wait covers, or a lowering for a synchronizing edge whose body does not end with raw::barrier() (the seam obligation of hir/seam.rs: a relaxed publication makes a stale read reachable).