[PATCH] D131276: AMDGPU: Implicit kernel arguments related optimization when uniform-workgroup-size=true

Changpeng Fang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 5 22:22:27 PDT 2022


cfang added a comment.

In D131276#3703686 <https://reviews.llvm.org/D131276#3703686>, @bcahoon wrote:

> In D131276#3703399 <https://reviews.llvm.org/D131276#3703399>, @cfang wrote:
>
>> In D131276#3703034 <https://reviews.llvm.org/D131276#3703034>, @b-sumner wrote:
>>
>>> In D131276#3702934 <https://reviews.llvm.org/D131276#3702934>, @arsenm wrote:
>>>
>>>> I also think we're still missing a module flag to indicate the code object version
>>>
>>> The module flag was implemented quite a while back.   See D119026 <https://reviews.llvm.org/D119026> from February.  From a recent compile:
>>>
>>> !llvm.module.flags = !{!0, !1, !2}
>>> !0 = !{i32 1, !"amdgpu_code_object_version", i32 500}
>>
>> We were using --amdhsa-code-object-version=5 to run LIT tests. Do you mean this flag will no longer take effect if we
>> switch to module flag for code object version?
>
> I think the flag is distinct from the metadata. The module metadata just records which version is being used. You can access it in the code:
>
> auto Ver = mdconst::dyn_extract_or_null<ConstantInt>(M.getModuleFlag("amdgpu_code_object_version"))
>
> and, then if Ver != 5, then there is no need to execute the loop with the calls to processImplicitArgUse().

This should work, Because most LIT tests have been manually written, amdgpu_code_object_version should not be existing in the module flag
for most, if not all, the tests. It is to say, Ver = null. So what should be the default value?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131276/new/

https://reviews.llvm.org/D131276



More information about the llvm-commits mailing list