[Mlir-commits] [mlir] [mlir][gpu] Skip address space checks for memrefs between launchFuncOp and kernel func (PR #102925)
Fabian Mora
llvmlistbot at llvm.org
Wed Aug 14 07:07:02 PDT 2024
fabianmcg wrote:
> It's not like it is specific to opencl runtime though; sycl has unified shared memory (see for example here: https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-2020.html#sec:memory.model) -
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.
> The semantics is the same too with the address space exception, so the operation would essentially be a copy of the `gpu.launch_func` with the changed validation.
The address space is part of the type, making exceptions is not the best solution.
> The problem is that it is unclear what should happen to a kernel that has two pointers as arguments: one with an attribute and one without.
You know that you can attach attributes to individual arguments?
One option is adding: `#gpu.address_space<unified>`.
https://github.com/llvm/llvm-project/pull/102925
More information about the Mlir-commits
mailing list