[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #75647)

Alexey Bader via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 16 11:31:14 PST 2024


bader wrote:

> How does this attribute relate to `reqd_work_group_size` and related existing attributes?

They seems to be different/"unrelated". Based on the description of the `amdgpu-num-work-groups` attribute it provides "number of work-groups", whereas `reqd_work_group_size` provides "number of work-items in a work-group".

I think this attributed can be useful for other targets. The optimization ideas described in https://github.com/llvm/llvm-project/pull/75647#issuecomment-1863352459 seems to be generic. There is an RFC to unify some existing functionality exposing "grid" information: https://discourse.llvm.org/t/proposing-llvm-gpu-intrinsics/75374. This might fall into similar category.

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


More information about the cfe-commits mailing list