[llvm] [Offload] Introduce offload-tblgen and initial new API implementation (PR #108413)
Joseph Huber via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 12 09:19:16 PDT 2024
================
@@ -0,0 +1,36 @@
+
+set(LLVM_TARGET_DEFINITIONS ${CMAKE_CURRENT_SOURCE_DIR}/API/OffloadAPI.td)
+list(APPEND LLVM_TABLEGEN_FLAGS -I ${CMAKE_CURRENT_SOURCE_DIR}/API)
+
+tablegen(OFFLOAD offload_api.h -gen-api)
+tablegen(OFFLOAD offload_funcs.inc -gen-func-names)
+tablegen(OFFLOAD offload_impl_func_decls.inc -gen-impl-func-decls)
+tablegen(OFFLOAD offload_entry_points.inc -gen-entry-points)
+tablegen(OFFLOAD offload_print.hpp -gen-print-header)
+
+
+add_public_tablegen_target(OffloadHeaderGen)
+
+add_llvm_library(offload_new SHARED
+ src/offload_lib.cpp
+ src/offload_impl.cpp
+ DEPENDS OffloadHeaderGen
+ LINK_LIBS omptarget omptarget.rtl.cuda omptarget.rtl.amdgpu)
----------------
jhuber6 wrote:
These can't be hard-coded, and why do we depend on `omptarget`? That's the OpenMP portion of the runtime while I thought this was a separate interface that merely shared the generic plugins.
https://github.com/llvm/llvm-project/pull/108413
More information about the llvm-commits
mailing list