File tree Expand file tree Collapse file tree 10 files changed +12
-26
lines changed Expand file tree Collapse file tree 10 files changed +12
-26
lines changed Original file line number Diff line number Diff line change @@ -49,14 +49,17 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "${tmachine}$")
4949 PRIVATE
5050 elf_common
5151 MemoryManager
52- OMPT
5352 PluginInterface
5453 ${LIBOMPTARGET_DEP_LIBFFI_LIBRARIES}
5554 ${OPENMP_PTHREAD_LIB}
5655
5756 NO_INSTALL_RPATH
5857 )
5958
59+ if ((OMPT_TARGET_DEFAULT) AND (LIBOMPTARGET_OMPT_SUPPORT))
60+ target_link_libraries ("omptarget.rtl.${tmachine_libname} " PRIVATE OMPT)
61+ endif ()
62+
6063 if (LIBOMP_HAVE_VERSION_SCRIPT_FLAG)
6164 target_link_libraries ("omptarget.rtl.${tmachine_libname} " PRIVATE
6265 "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR} /../exports" )
Original file line number Diff line number Diff line change 1919#include " Debug.h"
2020#include " Environment.h"
2121#include " GlobalHandler.h"
22+ #include " OmptCallback.h"
2223#include " PluginInterface.h"
2324#include " omptarget.h"
2425
@@ -378,7 +379,13 @@ struct GenELF64PluginTy final : public GenericPluginTy {
378379 GenELF64PluginTy (GenELF64PluginTy &&) = delete ;
379380
380381 // / Initialize the plugin and return the number of devices.
381- Expected<int32_t > initImpl () override { return NUM_DEVICES; }
382+ Expected<int32_t > initImpl () override {
383+ #ifdef OMPT_SUPPORT
384+ ompt::connectLibrary ();
385+ #endif
386+
387+ return NUM_DEVICES;
388+ }
382389
383390 // / Deinitialize the plugin.
384391 Error deinitImpl () override { return Plugin::success (); }
Original file line number Diff line number Diff line change 22// REQUIRES: ompt
33// UNSUPPORTED: aarch64-unknown-linux-gnu
44// UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
5- // UNSUPPORTED: x86_64-pc-linux-gnu
6- // UNSUPPORTED: x86_64-pc-linux-gnu-oldDriver
7- // UNSUPPORTED: x86_64-pc-linux-gnu-LTO
85
96/*
107 * Example OpenMP program that registers non-EMI callbacks
Original file line number Diff line number Diff line change 22// REQUIRES: ompt
33// UNSUPPORTED: aarch64-unknown-linux-gnu
44// UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
5- // UNSUPPORTED: x86_64-pc-linux-gnu
6- // UNSUPPORTED: x86_64-pc-linux-gnu-oldDriver
7- // UNSUPPORTED: x86_64-pc-linux-gnu-LTO
85
96/*
107 * Example OpenMP program that registers EMI callbacks.
Original file line number Diff line number Diff line change 22// REQUIRES: ompt
33// UNSUPPORTED: aarch64-unknown-linux-gnu
44// UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
5- // UNSUPPORTED: x86_64-pc-linux-gnu
6- // UNSUPPORTED: x86_64-pc-linux-gnu-oldDriver
7- // UNSUPPORTED: x86_64-pc-linux-gnu-LTO
85
96/*
107 * Example OpenMP program that shows that both EMI and non-EMI
Original file line number Diff line number Diff line change 22// REQUIRES: ompt
33// UNSUPPORTED: aarch64-unknown-linux-gnu
44// UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
5- // UNSUPPORTED: x86_64-pc-linux-gnu
6- // UNSUPPORTED: x86_64-pc-linux-gnu-oldDriver
7- // UNSUPPORTED: x86_64-pc-linux-gnu-LTO
85
96/*
107 * Example OpenMP program that registers EMI callbacks
Original file line number Diff line number Diff line change 22// REQUIRES: ompt
33// UNSUPPORTED: aarch64-unknown-linux-gnu
44// UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
5- // UNSUPPORTED: x86_64-pc-linux-gnu
6- // UNSUPPORTED: x86_64-pc-linux-gnu-oldDriver
7- // UNSUPPORTED: x86_64-pc-linux-gnu-LTO
85
96/*
107 * Example OpenMP program that shows that map-EMI callbacks are not supported.
Original file line number Diff line number Diff line change 22// REQUIRES: ompt
33// UNSUPPORTED: aarch64-unknown-linux-gnu
44// UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
5- // UNSUPPORTED: x86_64-pc-linux-gnu
6- // UNSUPPORTED: x86_64-pc-linux-gnu-oldDriver
7- // UNSUPPORTED: x86_64-pc-linux-gnu-LTO
85
96/*
107 * Example OpenMP program that shows that map callbacks are not supported.
Original file line number Diff line number Diff line change 11// RUN: %libomptarget-compile-run-and-check-generic
22// REQUIRES: ompt
3- // UNSUPPORTED: x86_64-pc-linux-gnu
4- // UNSUPPORTED: x86_64-pc-linux-gnu-oldDriver
5- // UNSUPPORTED: x86_64-pc-linux-gnu-LTO
63
74/*
85 * Example OpenMP program that shows that if no device init callback
Original file line number Diff line number Diff line change 11// RUN: %libomptarget-compile-run-and-check-generic
22// REQUIRES: ompt
3- // UNSUPPORTED: x86_64-pc-linux-gnu
4- // UNSUPPORTED: x86_64-pc-linux-gnu-oldDriver
5- // UNSUPPORTED: x86_64-pc-linux-gnu-LTO
63
74/*
85 * Example OpenMP program that shows that if the initialize function
You can’t perform that action at this time.
0 commit comments