![]() In HIP a library is usually compiled with default target ID e.g. gfx906 so that it can be used in all GPU configurations. The bitcode is saved in bundled bitcode with gfx906 in entry ID. In runtime compilation, a HIP program is compiled with a target ID matching the GPU configuration, e.g. gfx906:xnack-. This program needs to link with a library bundled bitcode with target ID gfx906. For example: clang --offload-arch=gfx906 -o lib.o lib.hip clang --offload-arch=gfx906:xnack- program.hip lib.o This common use case requires that clang-offlod-bundler to be able to extract entry with compatible target ID, e.g. extracting an gfx906 entry when requesting gfx906:xnack-. Currently clang-offload-bundler only allow extracting entry with exact match of target ID. This patch relaxes that so that it can extract entries with compatible target ID. Reviewed by: Artem Belevich, Saiyedul Islam Differential Revision: https://reviews.llvm.org/D134546 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
ClangOffloadBundler.cpp |