[Mlir-commits] [mlir] [mlir][gpu] Skip address space checks for memrefs between launchFuncOp and kernel func (PR #102925)
Petr Kurapov
llvmlistbot at llvm.org
Wed Aug 14 07:28:03 PDT 2024
kurapov-peter wrote:
> The issue is not unified memory. For example, CUDA and HIP also have it, but their models take the generic address space as the global one, hence no issues arise.
Yeah... somebody decided `1` is a great default value, now I'm suffering. One thought that comes to mind is whether this should be a part of some kind of a host-device calling convention (which is runtime-specific). That would make the validation strict by means of adhering to the convention and not rely on the default values.
> After taking a look at the MLIR Vulkan runner (also SPIR-V-based), it faces a similar issue and it's solution is to run a pass to set the expected address spaces both in host and device as part of the conversion pipeline.
Oh, interesting, thanks Victor! Isn't that weird though? I suppose it also relies on the implicit knowledge that on host this would yield correct address space just because the default one is zero?
https://github.com/llvm/llvm-project/pull/102925
More information about the Mlir-commits
mailing list