aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/libclang/LibclangTest.cpp
diff options
context:
space:
mode:
authorKrzysztof Drewniak <Krzysztof.Drewniak@amd.com>2022-12-05 22:17:34 +0000
committerKrzysztof Drewniak <Krzysztof.Drewniak@amd.com>2023-01-02 21:04:13 +0000
commitf6076bd81fce06bb29f83d370b8298110ecc2f99 (patch)
treec165266113e9e4664769ce7a8b8c6a83db0ed987 /clang/unittests/libclang/LibclangTest.cpp
parent2838507bd46a232d5932599baf9287293c254a40 (diff)
downloadllvm-f6076bd81fce06bb29f83d370b8298110ecc2f99.zip
llvm-f6076bd81fce06bb29f83d370b8298110ecc2f99.tar.gz
llvm-f6076bd81fce06bb29f83d370b8298110ecc2f99.tar.bz2
[mlir][ROCDL] Translate known block size attributes to ROCDL
1. When converting from the GPU dialect to the ROCDL dialect, if the function that contains a gpu.thread_id or gpu.block_id op is annotated with gpu.known_{block,grid}_size, use that size to set a "range" attribute on the corresponding rocdl intrinsic so that the LLVM frontend can optimize based on that range information. 1b. When translating from the rocdl dialect to LLVM IR, use the "range" attribute, if present, to set !range metadata on the relevant function call. 2. Deprecate the old rocdl.max_flat_work_group_size attribute, which was used in a tensorflow backend. Instead, use rocdl.flat_work_group_size going forward to allow kernel generators to specify the minimum and maximum work group sizes a kernel may be launched with in one attribute, thus more closely matching the backend. 3. When translating from gpu.func to llvm.func within gpu-to-rocdl, copy the known_block_size attribute as rocdl.reqd_work_group_size to enable further translations to set the corresponding metadata on the LLVM IR function. Also, set the rocdl.flat_work_group_size attribute to ensure that the reqd_work_group_size metadata and the amdgpu-flat-work-group-size metadata are consistent. 3b. Extend the ROCDL to LLVM IR translation to set the !reqd_work_group_size metadata on LLVM functions Also update tests and add functions to the ROCDL dialect to ensure attribute names are used consistently. Depends on D139865 Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D139866
Diffstat (limited to 'clang/unittests/libclang/LibclangTest.cpp')
0 files changed, 0 insertions, 0 deletions