D92434: AMDGPU code object V4 ABI -- docs don't quite match the source tree state.

Zhuravlyov, Konstantin via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 1 13:40:31 PST 2021


[AMD Official Use Only - Internal Distribution Only]

Hi,

Its under review:

https://reviews.llvm.org/D95638
https://reviews.llvm.org/D95811

________________________________________
From: Artem Belevich <tra at google.com>
Sent: Monday, February 1, 2021 4:05 PM
To: Tye, Tony; Zhuravlyov, Konstantin
Cc: Liu, Yaxun (Sam); llvm-commits
Subject: Re: D92434: AMDGPU code object V4 ABI -- docs don't quite match the source tree state.

[CAUTION: External Email]
Hi Konstantin, Tony,

Do you have any updates on when these changes will land?

--Artem

On Mon, Jan 11, 2021 at 10:17 AM Artem Belevich <tra at google.com<mailto:tra at google.com>> wrote:


On Fri, Jan 8, 2021 at 3:16 AM Tye, Tony <Tony.Tye at amd.com<mailto:Tony.Tye at amd.com>> wrote:

[AMD Public Use]

Hi Artem,
I believe the documentation is correct in its description of the code object v3, which is what is currently upstream. In addition, it descries code object v4 which is what will be pushed for review shortly. The plan had been to upstream all the changes together, but the holiday break messed that up. Konstantin is planning to push the remaining reviews in the next few days.

SGTM, and thank you for the update.

--Artem



Thanks,
-Tony

From: Artem Belevich <tra at google.com<mailto:tra at google.com>>
Sent: Thursday, January 7, 2021 6:46 PM
To: Tye, Tony <Tony.Tye at amd.com<mailto:Tony.Tye at amd.com>>; Liu, Yaxun (Sam) <Yaxun.Liu at amd.com<mailto:Yaxun.Liu at amd.com>>
Cc: llvm-commits <llvm-commits at lists.llvm.org<mailto:llvm-commits at lists.llvm.org>>
Subject: Re: D92434: AMDGPU code object V4 ABI -- docs don't quite match the source tree state.

[CAUTION: External Email]
+CC: Yaxun Liu.

On Thu, Jan 7, 2021 at 12:22 PM Artem Belevich <tra at google.com<mailto:tra at google.com>> wrote:
Hi,

It appears that the AMDGPU documentation updated in
https://reviews.llvm.org/D92434<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Freviews.llvm.org%2FD92434&data=04%7C01%7CKonstantin.Zhuravlyov%40amd.com%7C03d6427c31374561183d08d8c6f51d8a%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637478103358516618%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=xZGDjU9bPIkfqW2cE3fuX%2B9qFi%2BbYI9FaqKMc8pIqUI%3D&reserved=0> does not quite match the code we currently have in the LLVM source tree.

It's not very helpful when the recently-updated public docs say one thing, but the code does something completely different.

E.g. I'm failing to find ELF::EF_AMDGPU_FEATURE_XNACK_V2 and other new flags it describes. At the same time, the flags that were removed from the documentation are still there (e.g EF_AMDGPU_XNACK)
https://github.com/llvm/llvm-project/blob/4e2e785ddd35c421a4df9453f17b8317d6b62b2c/llvm/include/llvm/BinaryFormat/ELF.h#L738<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fllvm%2Fllvm-project%2Fblob%2F4e2e785ddd35c421a4df9453f17b8317d6b62b2c%2Fllvm%2Finclude%2Fllvm%2FBinaryFormat%2FELF.h%23L738&data=04%7C01%7CKonstantin.Zhuravlyov%40amd.com%7C03d6427c31374561183d08d8c6f51d8a%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637478103358516618%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=nukB1cnll22BQYCreDh3ZRMWwoiNFboWRpcgwP8gMrg%3D&reserved=0>

AFAICT, the current state of the tree matches V3 ABI, but uses different constant names than the ones used in the docs.

Are the corresponding code changes handled in a separate review? If so, I'd appreciate it if you could point me in the right direction and, maybe, update the review tracker, too.

AFAICT, the doc changes that landed in LLVM are part of this change in AMD's fork of the LLVM project:
https://github.com/ROCm-Developer-Tools/amd-llvm-project/commit/1ccc5cc50e77bc626c09043f0709dc0049b2780b<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FROCm-Developer-Tools%2Famd-llvm-project%2Fcommit%2F1ccc5cc50e77bc626c09043f0709dc0049b2780b&data=04%7C01%7CKonstantin.Zhuravlyov%40amd.com%7C03d6427c31374561183d08d8c6f51d8a%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637478103358526613%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=OADnY1Rx5doUfBoV3vL84FjbjK3sqPEeoqxFwsMm%2BUE%3D&reserved=0>

I assume the changes will eventually be upstreamed into LLVM. Is there an ETA for that?

The reason I'm asking is that I need to build AMD's comgr (https://github.com/RadeonOpenCompute/ROCm-CompilerSupport<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FRadeonOpenCompute%2FROCm-CompilerSupport&data=04%7C01%7CKonstantin.Zhuravlyov%40amd.com%7C03d6427c31374561183d08d8c6f51d8a%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637478103358536605%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Iy%2F4AJHL%2BCcpfXveTmkK02%2BdbMKCiVFLQW8ZLNYhxOk%3D&reserved=0>) with LLVM from the LLVM's tree. An old version of comgr (3.7) is broken because LLVM has recently changed some ELF-related APIs, and the most recent version of comgr does not build because it needs the ELF changes mentioned above that are not in the LLVM yet.  I can probably build comgr 4.0, which still uses the current version of LLVM's ELF constants, but it will be broken again once AMD's ELF changes do make it into LLVM. If the changes are going to land soon, I may as well wait until both comgr and LLVM are in sync, again.

--Artem




If the code is not quite ready yet, perhaps it would make sense to postpone doc updates (at least the parts that remove the info about the *current* state of the source tree) until the code is ready and clearly mark the parts of the documentation that describe things that do not exist yet.


Thank you,
--Artem Belevich


--
--Artem Belevich


--
--Artem Belevich


--
--Artem Belevich


More information about the llvm-commits mailing list