E6037

E6037 — A placement whose memory is not built in and has no scope:. Such a memory has no address space on the target. Declare the memory with scope: device, sm, cta or thread.

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