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