[PATCH] D84822: Add documentation for target ID and ClangOffloadBundlerFormat

Yaxun Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 19 06:29:03 PDT 2020


yaxunl added a comment.

In D84822#2225968 <https://reviews.llvm.org/D84822#2225968>, @JonChesterfield wrote:

> How does one opt out of this scheme?
>
> OpenMP already has a convention for finding code objects in the host binary, used by amdgpu and other targets, which I don't think matches the above.
>
> Where's the corresponding implementation? I think it's the llc part I need to read to understand whether this proposal can be used outside of HIP and amd's OpenCL.

If you do not care about turning on/off xnack and sram-ecc, you do not need to use it. The current processor name still works.

If you need to turn on/off xnack and sram-ecc, you need to use target ID. From user point of view, it is an extension to processor name. Target ID support is implemented in clang driver and backend (https://reviews.llvm.org/D60620). In clang driver, it is supported by clang tool by -mcpu option as an extension for processor name. As far as you pass target ID e.g. gfx906:xnack+ to clang tool by -mcpu, you will get target ID support in backend. My understanding is that since OpenMP only loads one GPU arch, only backend support is needed, therefore target ID support on OpenMP should be automatic.


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

https://reviews.llvm.org/D84822



More information about the llvm-commits mailing list