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

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 14 07:26:11 PDT 2023


yaxunl added a comment.

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.


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