[all-commits] [llvm/llvm-project] 453834: [mlir][rocdl] Change the translation of `GridDim*O...

Fabian Mora via All-commits all-commits at lists.llvm.org
Sat Jul 22 04:33:29 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4538347fb2dafbf7ec175ffa96f802472aa707e9
      https://github.com/llvm/llvm-project/commit/4538347fb2dafbf7ec175ffa96f802472aa707e9
  Author: Fabian Mora <fmora.dev at gmail.com>
  Date:   2023-07-22 (Sat, 22 Jul 2023)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td
    M mlir/test/Target/LLVMIR/rocdl.mlir

  Log Message:
  -----------
  [mlir][rocdl] Change the translation of `GridDim*Op` to `__ockl_get_num_groups`

Currently, `ROCDL::GridDim*Op` is being translated to `__ockl_get_global_size`, however
to match the meaning of `gpu.grid_dim` it should instead be translated to
`__ockl_get_num_groups`. This change would also make it agree with the meaning
of `gridDimx.*` in HIP, see:
https://github.com/ROCm-Developer-Tools/hipamd/blob/develop/include/hip/amd_detail/amd_hip_runtime.h#L257

Difference between the functions:
```
__ockl_get_global_size =  blockDim * numBlocks
__ockl_get_num_groups = numBlocks
```

Reviewed By: krzysz00

Differential Revision: https://reviews.llvm.org/D156009




More information about the All-commits mailing list