[Openmp-commits] [llvm] [openmp] [offload][ompt] Added lookup function for device callbacks (PR #110007)

Michael Halkenhäuser via Openmp-commits openmp-commits at lists.llvm.org
Thu Sep 26 08:15:33 PDT 2024


================
@@ -27,14 +27,77 @@
 #undef DEBUG_PREFIX
 #define DEBUG_PREFIX "OMPT"
 
+using namespace llvm::omp::target::ompt;
+
 // Define OMPT callback functions (bound to actual callbacks later on)
 #define defineOmptCallback(Name, Type, Code)                                   \
   Name##_t llvm::omp::target::ompt::Name##_fn = nullptr;
 FOREACH_OMPT_NOEMI_EVENT(defineOmptCallback)
 FOREACH_OMPT_EMI_EVENT(defineOmptCallback)
 #undef defineOmptCallback
 
-using namespace llvm::omp::target::ompt;
+int ompt_get_device_num_procs(ompt_device_t *device) { return 0; }
+
+ompt_device_time_t ompt_get_device_time(ompt_device_t *device) { return 0; }
+
+double ompt_translate_time(ompt_device_t *device, ompt_device_time_t time) {
+  return 0;
+}
+
+ompt_set_result_t ompt_set_trace_ompt(ompt_device_t *device,
----------------
mhalk wrote:

Downstream example (among others):
https://github.com/ROCm/llvm-project/blob/amd-staging/offload/plugins-nextgen/common/OMPT/OmptTracing.cpp#L120

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


More information about the Openmp-commits mailing list