| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[Reland][Libomptarget] Statically link all plugin runtimes (#87009) This patch overhauls the libomptarget and plugin interface. Currently, we define a C API and compile each plugin as a separate shared library. Then, libomptarget loads these API functions and forwards its internal calls to them. This was originally designed to allow multiple implementations of a library to be live. However, since then no one has used this functionality and it prevents us from using much nicer interfaces. If the old behavior is desired it should instead be implemented as a separate plugin. This patch replaces the PluginAdaptorTy interface with the GenericPluginTy that is used by the plugins. Each plugin exports a createPlugin_<name> function that is used to get the specific implementation. This code is now shared with libomptarget. There are some notable improvements to this. 1. Massively improved lifetimes of life runtime objects 2. The plugins can use a C++ interface 3. Global state does not need to be duplicated for each plugin + libomptarget 4. Easier to use and add features and improve error handling 5. Less function call overhead / Improved LTO performance. Additional changes in this plugin are related to contending with the fact that state is now shared. Initialization and deinitialization is now handled correctly and in phase with the underlying runtime, allowing us to actually know when something is getting deallocated. Depends on https://github.com/llvm/llvm-project/pull/86971 https://github.com/llvm/llvm-project/pull/86875 https://github.com/llvm/llvm-project/pull/86868 | 2 年前 | |
[Offload] Move /openmp/libomptarget to /offload (#75125) In a nutshell, this moves our libomptarget code to populate the offload subproject. With this commit, users need to enable the new LLVM/Offload subproject as a runtime in their cmake configuration. No further changes are expected for downstream code. Tests and other components still depend on OpenMP and have also not been renamed. The results below are for a build in which OpenMP and Offload are enabled runtimes. In addition to the pure git mv, we needed to adjust some CMake files. Nothing is intended to change semantics. ninja check-offload Works with the X86 and AMDGPU offload tests ninja check-openmp Still works but doesn't build offload tests anymore. ls install/lib Shows all expected libraries, incl. - libomptarget.devicertl.a - libomptarget-nvptx-sm_90.bc - libomptarget.rtl.amdgpu.so -> libomptarget.rtl.amdgpu.so.18git - libomptarget.so -> libomptarget.so.18git Fixes: https://github.com/llvm/llvm-project/issues/75124 --------- Co-authored-by: Saiyedul Islam <Saiyedul.Islam@amd.com> | 2 年前 | |
[Offload] Remove non-blocking allocation type (#159851) Summary: This was originally added in as a hack to work around CUDA's limitation on allocation. The libc implementation now isn't even used for CUDA so this code is never hit. Even if this case, this code never truly worked. A true solution would be to use CUDA's virtual memory API instead to allocate 2MiB slabs independenctly from the normal memory management done in the stream. | 10 个月前 | |
[Offload] Allow querying the size of globals (#147698) The GlobalTy helper has been extended to make both the Size and Ptr be optional. Now getGlobalMetadataFromDevice/Image is able to write the size of the global to the struct, instead of just verifying it. | 1 年前 | |
[Offload] Copy loaded images into managed storage (#158748) Summary: Currently we have this __tgt_device_image indirection which just takes a reference to some pointers. This was all find and good when the only usage of this was from a section of GPU code that came from an ELF constant section. However, we have expanded beyond that and now need to worry about managing lifetimes. We have code that references the image even after it was loaded internally. This patch changes the implementation to instaed copy the memory buffer and manage it locally. This PR reworks the JIT and other image handling to directly manage its own memory. We now don't need to duplicate this behavior externally at the Offload API level. Also we actually free these if the user unloads them. Upside, less likely to crash and burn. Downside, more latency when loading an image. | 10 个月前 | |
[Offload] Use Error for allocating/deallocating in plugins (#160811) Co-authored-by: Joseph Huber <huberjn@outlook.com> | 10 个月前 | |
[Offload] Don't check in generated files (#141982) Previously we decided to check in files that we generate with tablegen. The justification at the time was that it helped reviewers unfamiliar with offload-tblgen see the actual changes to the headers in PRs. After trying it for a while, it's ended up causing some headaches and is also not how tablegen is used elsewhere in LLVM. This changes our use of tablegen to be more conventional. Where possible, files are still clang-formatted, but this is no longer a hard requirement. Because OffloadErrcodes.inc is shared with libomptarget it now gets generated in a more appropriate place. | 1 年前 | |
[Offload] Add device info for shared memory (#167817) | 8 个月前 | |
[Offload] Properly guard modifications to the RPC device array (#126790) Summary: If the user deallocates an RPC device this can sometimes fail if the RPC server is still running. This will happen if the modification happens while the server is still checking it. This patch adds a mutex to guard modifications to it. | 1 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 2 年前 | ||
| 2 年前 | ||
| 10 个月前 | ||
| 1 年前 | ||
| 10 个月前 | ||
| 10 个月前 | ||
| 1 年前 | ||
| 8 个月前 | ||
| 1 年前 |