[Mlir-commits] [mlir] Skip address space checks for memrefs between launchOp and kernel func (PR #102925)

Fabian Mora llvmlistbot at llvm.org
Wed Aug 14 05:21:05 PDT 2024


https://github.com/fabianmcg requested changes to this pull request.

I'm blocking preemptively before discussing the changes.

Why don't you pass the correct address space from the beginning? For example:
```mlir
func.func @foo(%mem : memref<5xf32, #gpu.address_space<global>>) {
    gpu.launch_func @gpu_kernels::@kernel args(%mem : memref<5xf32, #gpu.address_space<global>>)
    return
  }
  gpu.module @gpu_kernels {
    gpu.func @kernel(%arg0 : memref<5xf32, #gpu.address_space<global>>) kernel {
      gpu.return
    }
  }
```

https://github.com/llvm/llvm-project/pull/102925


More information about the Mlir-commits mailing list