[all-commits] [llvm/llvm-project] 983807: [clang-offload-bundler] Make Bundle Entry ID backw...

Saiyedul Islam via All-commits all-commits at lists.llvm.org
Wed Sep 8 03:37:58 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 98380762c3b734c23d206182605ab9e035c93caa
      https://github.com/llvm/llvm-project/commit/98380762c3b734c23d206182605ab9e035c93caa
  Author: Saiyedul Islam <Saiyedul.Islam at amd.com>
  Date:   2021-09-08 (Wed, 08 Sep 2021)

  Changed paths:
    M clang/docs/ClangOffloadBundler.rst
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/test/Driver/clang-offload-bundler.c
    M clang/test/Driver/hip-rdc-device-only.hip
    M clang/test/Driver/hip-toolchain-rdc-separate.hip
    M clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp

  Log Message:
  -----------
  [clang-offload-bundler] Make Bundle Entry ID backward compatible

Earlier BundleEntryID used to be <OffloadKind>-<Triple>-<GPUArch>.
This used to work because the clang-offload-bundler didn't need
GPUArch explicitly for any bundling/unbundling action. With
unbundleArchive it needs GPUArch to ensure compatibility between
device specific code objects. D93525 enforced triples to have
separators for all 4 components irrespective of number of
components, like "amdgcn-amd-amdhsa--". It was required to
to correctly parse a possible 4th environment component or a GPU.
But, this condition is breaking backward compatibility with
archive libraries compiled with compilers older than D93525.

This patch allows triples to have any number of components with
and without extra separator for empty environment field. Thus,
both the following bundle entry IDs are same:
openmp-amdgcn-amd-amdhsa--gfx906
openmp-amdgcn-amd-amdhsa-gfx906

Reviewed By: yaxunl, grokos

Differential Revision: https://reviews.llvm.org/D106809




More information about the All-commits mailing list