<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">+CC: Yaxun Liu.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 7, 2021 at 12:22 PM Artem Belevich <<a href="mailto:tra@google.com">tra@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div style="font-family:verdana,sans-serif">Hi,</div><div style="font-family:verdana,sans-serif"><br></div><div style="font-family:verdana,sans-serif">It appears that the AMDGPU documentation updated in </div><div style="font-family:verdana,sans-serif"><a href="https://reviews.llvm.org/D92434" target="_blank">https://reviews.llvm.org/D92434</a> does not quite match the code we currently have in the LLVM source tree.<br></div><div style="font-family:verdana,sans-serif"><br></div><div style="font-family:verdana,sans-serif"><div><div>It's not very helpful when the recently-updated public docs say one thing, but the code does something completely different.</div></div><div></div></div><div style="font-family:verdana,sans-serif"><br></div><div style="font-family:verdana,sans-serif">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)</div><div style="font-family:verdana,sans-serif"><a href="https://github.com/llvm/llvm-project/blob/4e2e785ddd35c421a4df9453f17b8317d6b62b2c/llvm/include/llvm/BinaryFormat/ELF.h#L738" target="_blank">https://github.com/llvm/llvm-project/blob/4e2e785ddd35c421a4df9453f17b8317d6b62b2c/llvm/include/llvm/BinaryFormat/ELF.h#L738</a><br></div><div style="font-family:verdana,sans-serif"><br></div><div style="font-family:verdana,sans-serif">AFAICT, the current state of the tree matches V3 ABI, but uses different constant names than the ones used in the docs.</div><div style="font-family:verdana,sans-serif"><br></div><div style="font-family:verdana,sans-serif">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.</div></div></blockquote><div><br></div><div><div class="gmail_default" style="font-family:verdana,sans-serif">AFAICT, the doc changes that landed in LLVM are part of this change in AMD's fork of the LLVM project:</div><div class="gmail_default" style="font-family:verdana,sans-serif"><a href="https://github.com/ROCm-Developer-Tools/amd-llvm-project/commit/1ccc5cc50e77bc626c09043f0709dc0049b2780b">https://github.com/ROCm-Developer-Tools/amd-llvm-project/commit/1ccc5cc50e77bc626c09043f0709dc0049b2780b</a></div><br></div><div><div class="gmail_default" style="font-family:verdana,sans-serif">I assume the changes will eventually be upstreamed into LLVM. Is there an ETA for that?</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">The reason I'm asking is that I need to build AMD's comgr (<a href="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport">https://github.com/RadeonOpenCompute/ROCm-CompilerSupport</a>) 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.</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">--Artem</div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div style="font-family:verdana,sans-serif"><br></div><div style="font-family:verdana,sans-serif">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.</div><div><br></div><div><br></div><div><div style="font-family:verdana,sans-serif">Thank you,</div></div><div dir="ltr"><div dir="ltr">--Artem Belevich</div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">--Artem Belevich</div></div></div>