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

Jan André Reuter via Openmp-commits openmp-commits at lists.llvm.org
Thu Sep 26 04:45:27 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,
+                                      unsigned int enable, unsigned int etype) {
+  return ompt_set_error;
+}
+
+ompt_set_result_t ompt_set_trace_native(ompt_device_t *device, int enable,
+                                        int flags) {
+  return ompt_set_error;
----------------
Thyre wrote:

Same as `ompt_set_trace_ompt`

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


More information about the Openmp-commits mailing list