E6037
E6037 — A placement whose memory is not built in and has noscope:. Such a memory has no address space on the target. Declare the memory withscope: device,sm,ctaorthread.
What the compiler reports
Error[E6037] {{.*}}`Topology::TmemDev` in function 'by_device' has no address space on the target: `Memory::TMEM` has no `scope:`
Error[E6037] {{.*}}`Memory::TMEM` in function 'by_memory' has no address space on the target: `Memory::TMEM` has no `scope:`
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
//
// Part of the Vx Project, under the Apache License v2.0 with LLVM Exceptions.
// See LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// A declared memory with no `scope:` has no address space on the target. A
// tensor placed there is an error on both code generators, whether the type
// names the device or the memory. TMEM is the motivating case: Blackwell
// tensor memory has no plain GPU analogue, so it needs an explicit decision.
//
Memory TMEM {
within: Memory::GPU_HBM, capacity: 256 KiB, granule: 16 KiB, managed: explicit
}
Topology TmemDev {
memory: Memory::TMEM,
visible: [Memory::TMEM]
}
fn by_device(p : Tensor<f32, [4, 4], Topology::TmemDev>) -> i32 {
return 0;
}
fn by_memory(p : Tensor<f32, [4, 4], Memory::TMEM>) -> i32 {
return 0;
}
fn main() -> i32 {
return 0;
}
From tests/frontend/fail/memory_space_unmappable.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.
E6036A token of
transfer_async that the program drops with no .wait(): at the end of its scope, or when an assignment gives its variable a new value. The copy may not be done then, so its target may not hold the data. Call .wait(), which gives the placed tensor.
E6038A spawn on body for a device that uses a channel end, a lock, or a value that holds one. The standard library marks these types with the trait HostOnly. A wait on the device for the host can wait forever, because a GPU does not promise that its threads make progress. Send or receive before the spawn on, or after it. A spawn on(Topology::CPU) body runs on the host, so it can use them.