[Mlir-commits] [mlir] [mlir][gpu] Add the `OffloadEmbeddingAttr` offloading translation attr (PR #78117)

Fabian Mora llvmlistbot at llvm.org
Thu Feb 15 17:04:10 PST 2024


================
@@ -0,0 +1,61 @@
+//===- Offload.h - LLVM Target Offload --------------------------*- C++ -*-===//
----------------
fabianmcg wrote:

Currently, the `OffloadInfoManager` creates the entries and adds them to the `omp_offloading_entries` section. However, the `OffloadInfoManager` performs no explicit construction of the entry array needed by the binary descriptor. It's the linker's job to implicitly create the array using all the entries in the section.

The problem with this approach is that LLJIT doesn't handle the implicit creation of the array very well. To overcome this limitation of LLJIT, this class overrides the `OffloadInfoManager`'s behavior to construct the entry array explicitly.

In summary, this class can be removed up to an extent, but then JIT compilation is impossible, and a real linker is needed to obtain the final executable.

https://github.com/llvm/llvm-project/pull/78117


More information about the Mlir-commits mailing list