1*12c85518Srobert //===- OffloadWrapper.h --r-------------------------------------*- C++ -*-===// 2*12c85518Srobert // 3*12c85518Srobert // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*12c85518Srobert // See https://llvm.org/LICENSE.txt for license information. 5*12c85518Srobert // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*12c85518Srobert // 7*12c85518Srobert //===----------------------------------------------------------------------===// 8*12c85518Srobert 9*12c85518Srobert #ifndef LLVM_CLANG_TOOLS_CLANG_LINKER_WRAPPER_OFFLOAD_WRAPPER_H 10*12c85518Srobert #define LLVM_CLANG_TOOLS_CLANG_LINKER_WRAPPER_OFFLOAD_WRAPPER_H 11*12c85518Srobert 12*12c85518Srobert #include "llvm/ADT/ArrayRef.h" 13*12c85518Srobert #include "llvm/IR/Module.h" 14*12c85518Srobert 15*12c85518Srobert /// Wraps the input device images into the module \p M as global symbols and 16*12c85518Srobert /// registers the images with the OpenMP Offloading runtime libomptarget. 17*12c85518Srobert llvm::Error wrapOpenMPBinaries(llvm::Module &M, 18*12c85518Srobert llvm::ArrayRef<llvm::ArrayRef<char>> Images); 19*12c85518Srobert 20*12c85518Srobert /// Wraps the input fatbinary image into the module \p M as global symbols and 21*12c85518Srobert /// registers the images with the CUDA runtime. 22*12c85518Srobert llvm::Error wrapCudaBinary(llvm::Module &M, llvm::ArrayRef<char> Images); 23*12c85518Srobert 24*12c85518Srobert /// Wraps the input bundled image into the module \p M as global symbols and 25*12c85518Srobert /// registers the images with the HIP runtime. 26*12c85518Srobert llvm::Error wrapHIPBinary(llvm::Module &M, llvm::ArrayRef<char> Images); 27*12c85518Srobert 28*12c85518Srobert #endif 29