[Mlir-commits] [mlir] [mlir][GPU] Improve handling of GPU bounds (PR #95166)
Guray Ozen
llvmlistbot at llvm.org
Mon Jun 17 23:35:17 PDT 2024
grypp wrote:
I apologize for joining the discussion a bit late. I understand the rationale behind introducing the `known_block_size` attribute.
However, I have some concerns regarding the following code snippet (it's in the example). As per CUDA (or other gpu languages), these attributes are restricted to **GPU kernels**. It appears, based on my understanding, that the proposed changes in the PR are extending these attributes to `func.func`.
Could you please clarify the intended behavior of the following code? Specifically, should it be treated as a GPU kernel, a GPU function, or a host function?
```
func.func @annotated_kernel()
attributes {gpu.known_block_size = array<i32: 8, 12, 16>,
gpu.known_grid_size = array<i32: 20, 24, 28>} {
```
If the goal is to permit GPU kernel attributes on `func.func`, in that case, this PR needs a verifier that allows `known_block_size/known_grid_size` only on gpu kernels.
https://github.com/llvm/llvm-project/pull/95166
More information about the Mlir-commits
mailing list