[Cuda] Add initial support for wrapping CUDA images in the new driver.
authorJoseph Huber <jhuber6@vols.utk.edu>
Tue, 12 Apr 2022 15:21:36 +0000 (11:21 -0400)
committerJoseph Huber <jhuber6@vols.utk.edu>
Wed, 11 May 2022 11:30:23 +0000 (07:30 -0400)
commite7858a9fab8c11a44868ad4e0572c6c7618b219a
tree49974bc4ff16e1970bc87c49e86538d46b9a7fdc
parent0035f7154c2a80c58aea6c6dfcac548050e4c5e0
[Cuda] Add initial support for wrapping CUDA images in the new driver.

This patch adds the initial support for wrapping CUDA images. This
requires changing some of the logic for how we bundle images. We now
need to copy the image for all kinds that are active for the
architecture. Then we need to run a separate wrapping job if the Kind is
Cuda. For cuda wrapping we need to use the `fatbinary` program from the
CUDA SDK to bundle all the binaries together. This is then passed to a
new function to perfom the actual module code generation that will be
implemented in a later patch.

Depends on D120273 D123471

Reviewed By: tra

Differential Revision: https://reviews.llvm.org/D123810
clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
clang/tools/clang-linker-wrapper/OffloadWrapper.cpp
clang/tools/clang-linker-wrapper/OffloadWrapper.h
llvm/include/llvm/Object/OffloadBinary.h