[PATCH] D152882: [LinkerWrapper] Support device binaries in multiple link jobs

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 14 11:21:35 PDT 2023


jhuber6 added a comment.

In D152882#4421138 <https://reviews.llvm.org/D152882#4421138>, @yaxunl wrote:

> The design of target ID put constraints on target ID's that can be embedded into one executable https://clang.llvm.org/docs/ClangOffloadBundler.html#bundle-entry-id . For example, gfx90a and gfx90a:xnack+ cannot be embedded into one executable since this will cause difficulty for runtime to choose device binary to run, especially when there are multiple target ID features. clang does not allow --offload-arch=gfx90a and --offload-arch=gfx90a:xnack+ to be used together to compile HIP programs. It would be preferred for offloack-packager to enforce this constraint too.
>
> However, bitcode of  target ID gfx90a:xnack+ is allowed to link in bitcode of target ID gfx90a as long as they are from different containers. So there are two rules about target ID: 1. compatibility rules for objects/bitcode in the same container 2. compatibility rules for linking bitcode of different target ID's.
>
> we need tests for both rules.

Should that be a follow-up patch? Or one included here. It definitely influences the test so I can change that.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D152882



More information about the cfe-commits mailing list