[all-commits] [llvm/llvm-project] a1e81d: [HIP] Support compressing device binary (#67162)

Yaxun (Sam) Liu via All-commits all-commits at lists.llvm.org
Wed Oct 4 06:33:09 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a1e81d2ead02e041471ec2299d7382f80c4dbba6
      https://github.com/llvm/llvm-project/commit/a1e81d2ead02e041471ec2299d7382f80c4dbba6
  Author: Yaxun (Sam) Liu <yaxun.liu at amd.com>
  Date:   2023-10-04 (Wed, 04 Oct 2023)

  Changed paths:
    M clang/docs/ClangOffloadBundler.rst
    M clang/include/clang/Driver/OffloadBundler.h
    M clang/include/clang/Driver/Options.td
    M clang/lib/Driver/OffloadBundler.cpp
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/lib/Driver/ToolChains/HIPUtility.cpp
    A clang/test/Driver/clang-offload-bundler-zlib.c
    A clang/test/Driver/clang-offload-bundler-zstd.c
    A clang/test/Driver/hip-offload-compress-zlib.hip
    A clang/test/Driver/hip-offload-compress-zstd.hip
    M clang/tools/clang-offload-bundler/CMakeLists.txt
    M clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp
    M llvm/include/llvm/BinaryFormat/Magic.h
    M llvm/lib/BinaryFormat/Magic.cpp
    M llvm/lib/Object/Binary.cpp
    M llvm/lib/Object/ObjectFile.cpp

  Log Message:
  -----------
  [HIP] Support compressing device binary (#67162)

Add option -f[no-]offload-compress to clang to enable/disable
compression of device binary for HIP. By default it is disabled.

Add option -compress to clang-offload-bundler to enable compression of
offload bundle. By default it is disabled.

When enabled, zstd or zlib is used for compression when available.

When disabled, it is NFC compared to previous behavior. The same offload
bundle format is used as before.

Clang-offload-bundler automatically detects whether the input file to be
unbundled is compressed and the compression method and decompress if
necessary.




More information about the All-commits mailing list