rocprofiler-sdk/ompt/omp-tools.h Source File

rocprofiler-sdk/ompt/omp-tools.h Source File#

Rocprofiler SDK Developer API: rocprofiler-sdk/ompt/omp-tools.h Source File
Rocprofiler SDK Developer API 0.6.0
ROCm Profiling API and tools
omp-tools.h
Go to the documentation of this file.
1/*
2 * include/omp-tools.h.var
3 */
4
5//===----------------------------------------------------------------------===//
6//
7// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
8// See https://llvm.org/LICENSE.txt for license information.
9// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef __OMPT__
14#define __OMPT__
15
16/*****************************************************************************
17 * system include files
18 *****************************************************************************/
19
20#include <stddef.h>
21#include <stdint.h>
22
23#ifdef DEPRECATION_WARNINGS
24# ifdef __cplusplus
25# define DEPRECATED_51 [[deprecated("as of 5.1")]]
26# else
27# define DEPRECATED_51 __attribute__((deprecated("as of 5.1")))
28# endif
29#else
30# define DEPRECATED_51
31#endif
32
33/*****************************************************************************
34 * iteration macros
35 *****************************************************************************/
36
37#define FOREACH_OMPT_INQUIRY_FN(macro) \
38 macro(ompt_enumerate_states) macro(ompt_enumerate_mutex_impls) \
39 \
40 macro(ompt_set_callback) macro(ompt_get_callback) \
41 \
42 macro(ompt_get_state) \
43 \
44 macro(ompt_get_parallel_info) macro(ompt_get_task_info) \
45 macro(ompt_get_task_memory) macro(ompt_get_thread_data) \
46 macro(ompt_get_unique_id) macro(ompt_finalize_tool) \
47 \
48 macro(ompt_get_num_procs) macro(ompt_get_num_places) \
49 macro(ompt_get_place_proc_ids) macro(ompt_get_place_num) \
50 macro(ompt_get_partition_place_nums) macro(ompt_get_proc_id) \
51 \
52 macro(ompt_get_target_info) macro(ompt_get_num_devices)
53
54#define FOREACH_OMPT_STATE(macro) \
55 \
56 /* first available state */ \
57 macro(ompt_state_undefined, 0x102) /* undefined thread state */ \
58 \
59 /* work states (0..15) */ \
60 macro(ompt_state_work_serial, 0x000) /* working outside parallel */ \
61 macro(ompt_state_work_parallel, 0x001) /* working within parallel */ \
62 macro(ompt_state_work_reduction, 0x002) /* performing a reduction */ \
63 \
64 /* barrier wait states (16..31) */ \
65 macro(ompt_state_wait_barrier, 0x010) /* waiting at a barrier */ \
66 macro(ompt_state_wait_barrier_implicit_parallel, \
67 0x011) /* implicit barrier at the end of parallel region */ \
68 macro(ompt_state_wait_barrier_implicit_workshare, \
69 0x012) /* implicit barrier at the end of worksharing */ \
70 macro(ompt_state_wait_barrier_implicit, 0x013) /* implicit barrier */ \
71 macro(ompt_state_wait_barrier_explicit, 0x014) /* explicit barrier */ \
72 \
73 /* task wait states (32..63) */ \
74 macro(ompt_state_wait_taskwait, 0x020) /* waiting at a taskwait */ \
75 macro(ompt_state_wait_taskgroup, 0x021) /* waiting at a taskgroup */ \
76 \
77 /* mutex wait states (64..127) */ \
78 macro(ompt_state_wait_mutex, 0x040) \
79 macro(ompt_state_wait_lock, 0x041) /* waiting for lock */ \
80 macro(ompt_state_wait_critical, 0x042) /* waiting for critical */ \
81 macro(ompt_state_wait_atomic, 0x043) /* waiting for atomic */ \
82 macro(ompt_state_wait_ordered, 0x044) /* waiting for ordered */ \
83 \
84 /* target wait states (128..255) */ \
85 macro(ompt_state_wait_target, 0x080) /* waiting for target region */ \
86 macro(ompt_state_wait_target_map, 0x081) /* waiting for target data mapping operation */ \
87 macro(ompt_state_wait_target_update, 0x082) /* waiting for target update operation */ \
88 \
89 /* misc (256..511) */ \
90 macro(ompt_state_idle, 0x100) /* waiting for work */ \
91 macro(ompt_state_overhead, 0x101) /* overhead excluding wait states */ \
92 \
93 /* implementation-specific states (512..) */
94
95#define FOREACH_KMP_MUTEX_IMPL(macro) \
96 macro(kmp_mutex_impl_none, 0) /* unknown implementation */ \
97 macro(kmp_mutex_impl_spin, 1) /* based on spin */ \
98 macro(kmp_mutex_impl_queuing, 2) /* based on some fair policy */ \
99 macro(kmp_mutex_impl_speculative, 3) /* based on HW-supported speculation */
100
101#define FOREACH_OMPT_HOST_EVENT(macro) \
102 \
103 /*--- Mandatory Events ---*/ \
104 macro(ompt_callback_thread_begin, ompt_callback_thread_begin_t, 1) /* thread begin */ \
105 macro(ompt_callback_thread_end, ompt_callback_thread_end_t, 2) /* thread end */ \
106 \
107 macro(ompt_callback_parallel_begin, \
108 ompt_callback_parallel_begin_t, \
109 3) /* parallel begin */ \
110 macro(ompt_callback_parallel_end, ompt_callback_parallel_end_t, 4) /* parallel end */ \
111 \
112 macro(ompt_callback_task_create, ompt_callback_task_create_t, 5) /* task begin */ \
113 macro(ompt_callback_task_schedule, ompt_callback_task_schedule_t, 6) /* task schedule */ \
114 macro(ompt_callback_implicit_task, ompt_callback_implicit_task_t, 7) /* implicit task */ \
115 \
116 macro(ompt_callback_control_tool, ompt_callback_control_tool_t, 11) /* control tool */ \
117 \
118 /* Optional Events */ \
119 macro(ompt_callback_sync_region_wait, \
120 ompt_callback_sync_region_t, \
121 16) /* sync region wait begin or end */ \
122 \
123 macro(ompt_callback_mutex_released, ompt_callback_mutex_t, 17) /* mutex released */ \
124 \
125 macro(ompt_callback_dependences, \
126 ompt_callback_dependences_t, \
127 18) /* report task dependences */ \
128 macro(ompt_callback_task_dependence, \
129 ompt_callback_task_dependence_t, \
130 19) /* report task dependence */ \
131 \
132 macro(ompt_callback_work, ompt_callback_work_t, 20) /* task at work begin or end */ \
133 \
134 macro(ompt_callback_masked, ompt_callback_masked_t, 21) /* task at masked begin or end */ \
135 \
136 macro(ompt_callback_sync_region, \
137 ompt_callback_sync_region_t, \
138 23) /* sync region begin or end */ \
139 \
140 macro(ompt_callback_lock_init, ompt_callback_mutex_acquire_t, 24) /* lock init */ \
141 macro(ompt_callback_lock_destroy, ompt_callback_mutex_t, 25) /* lock destroy */ \
142 \
143 macro(ompt_callback_mutex_acquire, ompt_callback_mutex_acquire_t, 26) /* mutex acquire */ \
144 macro(ompt_callback_mutex_acquired, ompt_callback_mutex_t, 27) /* mutex acquired */ \
145 \
146 macro(ompt_callback_nest_lock, ompt_callback_nest_lock_t, 28) /* nest lock */ \
147 \
148 macro(ompt_callback_flush, ompt_callback_flush_t, 29) /* after executing flush */ \
149 \
150 macro(ompt_callback_cancel, \
151 ompt_callback_cancel_t, \
152 30) /* cancel innermost binding region */ \
153 \
154 macro(ompt_callback_reduction, ompt_callback_sync_region_t, 31) /* reduction */ \
155 \
156 macro(ompt_callback_dispatch, ompt_callback_dispatch_t, 32) /* dispatch of work */ \
157 macro(ompt_callback_error, ompt_callback_error_t, 37) /* error */
158
159#define FOREACH_OMPT_DEVICE_EVENT(macro) \
160 /*--- Mandatory Events ---*/ \
161 macro(ompt_callback_device_initialize, \
162 ompt_callback_device_initialize_t, \
163 12) /* device initialize */ \
164 macro(ompt_callback_device_finalize, \
165 ompt_callback_device_finalize_t, \
166 13) /* device finalize */ \
167 \
168 macro(ompt_callback_device_load, ompt_callback_device_load_t, 14) /* device load */ \
169 macro(ompt_callback_device_unload, ompt_callback_device_unload_t, 15) /* device unload */
170
171#define FOREACH_OMPT_NOEMI_EVENT(macro) \
172 /*--- Mandatory Events ---*/ \
173 macro(ompt_callback_target, ompt_callback_target_t, 8) /* target */ \
174 macro(ompt_callback_target_data_op, \
175 ompt_callback_target_data_op_t, \
176 9) /* target data op */ \
177 macro(ompt_callback_target_submit, \
178 ompt_callback_target_submit_t, \
179 10) /* target submit */ /* Optional Events */ \
180 macro(ompt_callback_target_map, ompt_callback_target_map_t, 22) /* target map */
181
182#define FOREACH_OMPT_EMI_EVENT(macro) \
183 /*--- Mandatory Events ---*/ \
184 macro(ompt_callback_target_emi, ompt_callback_target_emi_t, 33) /* target */ \
185 macro(ompt_callback_target_data_op_emi, \
186 ompt_callback_target_data_op_emi_t, \
187 34) /* target data op */ \
188 macro(ompt_callback_target_submit_emi, \
189 ompt_callback_target_submit_emi_t, \
190 35) /* target submit */ /* Optional Events */ \
191 macro(ompt_callback_target_map_emi, ompt_callback_target_map_emi_t, 36) /* target map */
192
193#define FOREACH_OMPT_50_TARGET_EVENT(macro) \
194 FOREACH_OMPT_DEVICE_EVENT(macro) \
195 FOREACH_OMPT_NOEMI_EVENT(macro)
196
197#define FOREACH_OMPT_51_TARGET_EVENT(macro) \
198 FOREACH_OMPT_DEVICE_EVENT(macro) \
199 FOREACH_OMPT_EMI_EVENT(macro)
200
201#define FOREACH_OMPT_EVENT(macro) \
202 FOREACH_OMPT_HOST_EVENT(macro) \
203 FOREACH_OMPT_DEVICE_EVENT(macro) \
204 FOREACH_OMPT_NOEMI_EVENT(macro) \
205 FOREACH_OMPT_EMI_EVENT(macro)
206
207#define FOREACH_OMPT_51_EVENT(macro) \
208 FOREACH_OMPT_HOST_EVENT(macro) \
209 FOREACH_OMPT_DEVICE_EVENT(macro) \
210 FOREACH_OMPT_EMI_EVENT(macro)
211
212/*****************************************************************************
213 * implementation specific types
214 *****************************************************************************/
215
217{
218#define kmp_mutex_impl_macro(impl, code) impl = code,
220#undef kmp_mutex_impl_macro
222
223/*****************************************************************************
224 * definitions generated from spec
225 *****************************************************************************/
226
268
275
281
291
292typedef uint64_t ompt_id_t;
293
294typedef uint64_t ompt_device_time_t;
295
296typedef uint64_t ompt_buffer_cursor_t;
297
305
312
321
335
349
365
376
388
390{
391 ompt_task_initial = 0x00000001,
392 ompt_task_implicit = 0x00000002,
393 ompt_task_explicit = 0x00000004,
394 ompt_task_target = 0x00000008,
395 ompt_task_taskwait = 0x00000010,
397 ompt_task_untied = 0x10000000,
398 ompt_task_final = 0x20000000,
400 ompt_task_merged = 0x80000000
402
414
426
434
444
457
463
474
475typedef uint64_t ompt_hwid_t;
476
477typedef uint64_t ompt_wait_id_t;
478
487
519
520typedef uint64_t (*ompt_get_unique_id_t)(void);
521
522typedef uint64_t ompd_size_t;
523
524typedef uint64_t ompd_wait_id_t;
525
526typedef uint64_t ompd_addr_t;
527typedef int64_t ompd_word_t;
528typedef uint64_t ompd_seg_t;
529
530typedef uint64_t ompd_device_t;
531
532typedef uint64_t ompd_thread_id_t;
533
543
544typedef uint64_t ompd_icv_id_t;
545
562
563typedef void (*ompt_interface_fn_t)(void);
564
565typedef ompt_interface_fn_t (*ompt_function_lookup_t)(const char* interface_function_name);
566
567typedef union ompt_data_t
568{
569 uint64_t value;
570 void* ptr;
572
580
581typedef void (*ompt_callback_t)(void);
582
583typedef void ompt_device_t;
584
585typedef void ompt_buffer_t;
586
587typedef void (*ompt_callback_buffer_request_t)(int device_num,
588 ompt_buffer_t** buffer,
589 size_t* bytes);
590
591typedef void (*ompt_callback_buffer_complete_t)(int device_num,
592 ompt_buffer_t* buffer,
593 size_t bytes,
595 int buffer_owned);
596
597typedef void (*ompt_finalize_t)(ompt_data_t* tool_data);
598
600 int initial_device_num,
601 ompt_data_t* tool_data);
602
609
618
624
626{
627 uint64_t start;
628 uint64_t iterations;
630
631typedef int (*ompt_enumerate_states_t)(int current_state,
632 int* next_state,
633 const char** next_state_name);
634
635typedef int (*ompt_enumerate_mutex_impls_t)(int current_impl,
636 int* next_impl,
637 const char** next_impl_name);
638
640
641typedef int (*ompt_get_callback_t)(ompt_callbacks_t event, ompt_callback_t* callback);
642
643typedef ompt_data_t* (*ompt_get_thread_data_t)(void);
644
645typedef int (*ompt_get_num_procs_t)(void);
646
647typedef int (*ompt_get_num_places_t)(void);
648
649typedef int (*ompt_get_place_proc_ids_t)(int place_num, int ids_size, int* ids);
650
651typedef int (*ompt_get_place_num_t)(void);
652
653typedef int (*ompt_get_partition_place_nums_t)(int place_nums_size, int* place_nums);
654
655typedef int (*ompt_get_proc_id_t)(void);
656
657typedef int (*ompt_get_state_t)(ompt_wait_id_t* wait_id);
658
659typedef int (*ompt_get_parallel_info_t)(int ancestor_level,
660 ompt_data_t** parallel_data,
661 int* team_size);
662
663typedef int (*ompt_get_task_info_t)(int ancestor_level,
664 int* flags,
665 ompt_data_t** task_data,
666 ompt_frame_t** task_frame,
667 ompt_data_t** parallel_data,
668 int* thread_num);
669
670typedef int (*ompt_get_task_memory_t)(void** addr, size_t* size, int block);
671
672typedef int (*ompt_get_target_info_t)(uint64_t* device_num,
673 ompt_id_t* target_id,
674 ompt_id_t* host_op_id);
675
676typedef int (*ompt_get_num_devices_t)(void);
677
678typedef void (*ompt_finalize_tool_t)(void);
679
681
683
685
687 unsigned int enable,
688 unsigned int etype);
689
690typedef ompt_set_result_t (*ompt_set_trace_native_t)(ompt_device_t* device, int enable, int flags);
691
692typedef int (*ompt_start_trace_t)(ompt_device_t* device,
695
696typedef int (*ompt_pause_trace_t)(ompt_device_t* device, int begin_pause);
697
698typedef int (*ompt_flush_trace_t)(ompt_device_t* device);
699
700typedef int (*ompt_stop_trace_t)(ompt_device_t* device);
701
703 ompt_buffer_t* buffer,
704 size_t size,
705 ompt_buffer_cursor_t current,
707
709 ompt_buffer_cursor_t current);
710
711typedef void* (*ompt_get_record_native_t)(ompt_buffer_t* buffer,
712 ompt_buffer_cursor_t current,
713 ompt_id_t* host_op_id);
714
715typedef ompt_record_abstract_t* (*ompt_get_record_abstract_t)(void* native_record);
716
717typedef void (*ompt_callback_thread_begin_t)(ompt_thread_t thread_type, ompt_data_t* thread_data);
718
723
724typedef void (*ompt_callback_thread_end_t)(ompt_data_t* thread_data);
725
726typedef void (*ompt_callback_parallel_begin_t)(ompt_data_t* encountering_task_data,
727 const ompt_frame_t* encountering_task_frame,
728 ompt_data_t* parallel_data,
729 unsigned int requested_parallelism,
730 int flags,
731 const void* codeptr_ra);
732
741
742typedef void (*ompt_callback_parallel_end_t)(ompt_data_t* parallel_data,
743 ompt_data_t* encountering_task_data,
744 int flags,
745 const void* codeptr_ra);
746
754
755typedef void (*ompt_callback_work_t)(ompt_work_t work_type,
756 ompt_scope_endpoint_t endpoint,
757 ompt_data_t* parallel_data,
758 ompt_data_t* task_data,
759 uint64_t count,
760 const void* codeptr_ra);
761
771
772typedef void (*ompt_callback_dispatch_t)(ompt_data_t* parallel_data,
773 ompt_data_t* task_data,
774 ompt_dispatch_t kind,
775 ompt_data_t instance);
776
784
785typedef void (*ompt_callback_task_create_t)(ompt_data_t* encountering_task_data,
786 const ompt_frame_t* encountering_task_frame,
787 ompt_data_t* new_task_data,
788 int flags,
789 int has_dependences,
790 const void* codeptr_ra);
791
800
801typedef void (*ompt_callback_dependences_t)(ompt_data_t* task_data,
802 const ompt_dependence_t* deps,
803 int ndeps);
804
811
812typedef void (*ompt_callback_task_dependence_t)(ompt_data_t* src_task_data,
813 ompt_data_t* sink_task_data);
814
820
821typedef void (*ompt_callback_task_schedule_t)(ompt_data_t* prior_task_data,
822 ompt_task_status_t prior_task_status,
823 ompt_data_t* next_task_data);
824
831
833 ompt_data_t* parallel_data,
834 ompt_data_t* task_data,
835 unsigned int actual_parallelism,
836 unsigned int index,
837 int flags);
838
848
850 ompt_data_t* parallel_data,
851 ompt_data_t* task_data,
852 const void* codeptr_ra);
853
855
863
865 ompt_scope_endpoint_t endpoint,
866 ompt_data_t* parallel_data,
867 ompt_data_t* task_data,
868 const void* codeptr_ra);
869
878
880 unsigned int hint,
881 unsigned int impl,
882 ompt_wait_id_t wait_id,
883 const void* codeptr_ra);
884
893
895 ompt_wait_id_t wait_id,
896 const void* codeptr_ra);
897
904
906 ompt_wait_id_t wait_id,
907 const void* codeptr_ra);
908
915
916typedef void (*ompt_callback_flush_t)(ompt_data_t* thread_data, const void* codeptr_ra);
917
919{
920 const void* codeptr_ra;
922
923typedef void (*ompt_callback_cancel_t)(ompt_data_t* task_data, int flags, const void* codeptr_ra);
924
931
932typedef void (*ompt_callback_device_initialize_t)(int device_num,
933 const char* type,
934 ompt_device_t* device,
936 const char* documentation);
937
938typedef void (*ompt_callback_device_finalize_t)(int device_num);
939
940typedef void (*ompt_callback_device_load_t)(int device_num,
941 const char* filename,
942 int64_t offset_in_file,
943 void* vma_in_file,
944 size_t bytes,
945 void* host_addr,
946 void* device_addr,
947 uint64_t module_id);
948
949typedef void (*ompt_callback_device_unload_t)(int device_num, uint64_t module_id);
950
952 ompt_data_t* target_task_data,
953 ompt_data_t* target_data,
954 ompt_id_t* host_op_id,
956 void* src_addr,
957 int src_device_num,
958 void* dest_addr,
959 int dest_device_num,
960 size_t bytes,
961 const void* codeptr_ra);
962
964 ompt_id_t host_op_id,
966 void* src_addr,
967 int src_device_num,
968 void* dest_addr,
969 int dest_device_num,
970 size_t bytes,
971 const void* codeptr_ra);
972
985
987 ompt_scope_endpoint_t endpoint,
988 int device_num,
989 ompt_data_t* task_data,
990 ompt_data_t* target_task_data,
991 ompt_data_t* target_data,
992 const void* codeptr_ra);
993
995 ompt_scope_endpoint_t endpoint,
996 int device_num,
997 ompt_data_t* task_data,
998 ompt_id_t target_id,
999 const void* codeptr_ra);
1000
1010
1011typedef void (*ompt_callback_target_map_emi_t)(ompt_data_t* target_data,
1012 unsigned int nitems,
1013 void** host_addr,
1014 void** device_addr,
1015 size_t* bytes,
1016 unsigned int* mapping_flags,
1017 const void* codeptr_ra);
1018
1019typedef void (*ompt_callback_target_map_t)(ompt_id_t target_id,
1020 unsigned int nitems,
1021 void** host_addr,
1022 void** device_addr,
1023 size_t* bytes,
1024 unsigned int* mapping_flags,
1025 const void* codeptr_ra);
1026
1037
1039 ompt_data_t* target_data,
1040 ompt_id_t* host_op_id,
1041 unsigned int requested_num_teams);
1042
1044 ompt_id_t host_op_id,
1045 unsigned int requested_num_teams);
1046
1054
1055typedef int (*ompt_callback_control_tool_t)(uint64_t command,
1056 uint64_t modifier,
1057 void* arg,
1058 const void* codeptr_ra);
1059
1061{
1062 uint64_t command;
1063 uint64_t modifier;
1064 const void* codeptr_ra;
1066
1068 const char* message,
1069 size_t length,
1070 const void* codeptr_ra);
1071
1079
1085
1091
1092typedef struct _ompd_aspace_handle ompd_address_space_handle_t;
1093typedef struct _ompd_thread_handle ompd_thread_handle_t;
1094typedef struct _ompd_parallel_handle ompd_parallel_handle_t;
1095typedef struct _ompd_task_handle ompd_task_handle_t;
1096
1097typedef struct _ompd_aspace_cont ompd_address_space_context_t;
1098typedef struct _ompd_thread_cont ompd_thread_context_t;
1099
1109
1110void
1112
1114
1116
1118 ompd_address_space_context_t* address_space_context,
1119 ompd_thread_id_t kind,
1120 ompd_size_t sizeof_thread_id,
1121 const void* thread_id,
1122 ompd_thread_context_t** thread_context);
1123
1126
1128 ompd_address_space_context_t* address_space_context,
1129 ompd_thread_context_t* thread_context,
1130 const char* symbol_name,
1131 ompd_address_t* symbol_addr,
1132 const char* file_name);
1133
1135 ompd_address_space_context_t* address_space_context,
1136 ompd_thread_context_t* thread_context,
1137 const ompd_address_t* addr,
1138 ompd_size_t nbytes,
1139 void* buffer);
1140
1142 ompd_address_space_context_t* address_space_context,
1143 ompd_thread_context_t* thread_context,
1144 const ompd_address_t* addr,
1145 ompd_size_t nbytes,
1146 const void* buffer);
1147
1149 ompd_address_space_context_t* address_space_context,
1150 const void* input,
1151 ompd_size_t unit_size,
1152 ompd_size_t count,
1153 void* output);
1154
1155typedef ompd_rc_t (*ompd_callback_print_string_fn_t)(const char* string, int category);
1156
1171
1172void
1174
1175void
1177
1178void
1180
1181void
1183
1184void
1186
1187void
1189
1190void
1192
1193void
1195
1197ompd_initialize(ompd_word_t api_version, const ompd_callbacks_t* callbacks);
1198
1201
1203ompd_get_version_string(const char** string);
1204
1207
1211
1214 ompd_address_space_context_t* device_context,
1215 ompd_device_t kind,
1216 ompd_size_t sizeof_id,
1217 void* id,
1218 ompd_address_space_handle_t** device_handle);
1219
1222
1225
1228
1231 int thread_num,
1232 ompd_thread_handle_t** thread_handle);
1233
1236 ompd_thread_id_t kind,
1237 ompd_size_t sizeof_thread_id,
1238 const void* thread_id,
1239 ompd_thread_handle_t** thread_handle);
1240
1243
1246 ompd_thread_handle_t* thread_handle_2,
1247 int* cmp_value);
1248
1251 ompd_thread_id_t kind,
1252 ompd_size_t sizeof_thread_id,
1253 void* thread_id);
1254
1257 ompd_parallel_handle_t** parallel_handle);
1258
1261 ompd_parallel_handle_t** enclosing_parallel_handle);
1262
1265 ompd_parallel_handle_t** task_parallel_handle);
1266
1269
1272 ompd_parallel_handle_t* parallel_handle_2,
1273 int* cmp_value);
1274
1277
1280 ompd_task_handle_t** generating_task_handle);
1281
1284 ompd_task_handle_t** scheduling_task_handle);
1285
1288 int thread_num,
1289 ompd_task_handle_t** task_handle);
1290
1293
1296 ompd_task_handle_t* task_handle_2,
1297 int* cmp_value);
1298
1301
1304 ompd_frame_info_t* exit_frame,
1305 ompd_frame_info_t* enter_frame);
1306
1309 ompd_word_t current_state,
1310 ompd_word_t* next_state,
1311 const char** next_state_name,
1312 ompd_word_t* more_enums);
1313
1316
1319 const char* const** control_vars);
1320
1322ompd_rel_display_control_vars(const char* const** control_vars);
1323
1326 ompd_icv_id_t current,
1327 ompd_icv_id_t* next_id,
1328 const char** next_icv_name,
1329 ompd_scope_t* next_scope,
1330 int* more);
1331
1334 ompd_scope_t scope,
1335 ompd_icv_id_t icv_id,
1336 ompd_word_t* icv_value);
1337
1340 ompd_scope_t scope,
1341 ompd_icv_id_t icv_id,
1342 const char** icv_string);
1343
1346
1348{
1353 union
1354 {
1355 ompt_record_thread_begin_t thread_begin;
1356 ompt_record_parallel_begin_t parallel_begin;
1357 ompt_record_parallel_end_t parallel_end;
1358 ompt_record_work_t work;
1359 ompt_record_dispatch_t dispatch;
1360 ompt_record_task_create_t task_create;
1361 ompt_record_dependences_t dependences;
1362 ompt_record_task_dependence_t task_dependence;
1363 ompt_record_task_schedule_t task_schedule;
1364 ompt_record_implicit_task_t implicit_task;
1365 ompt_record_masked_t masked;
1366 ompt_record_sync_region_t sync_region;
1367 ompt_record_mutex_acquire_t mutex_acquire;
1368 ompt_record_mutex_t mutex;
1369 ompt_record_nest_lock_t nest_lock;
1370 ompt_record_flush_t flush;
1371 ompt_record_cancel_t cancel;
1372 ompt_record_target_t target;
1373 ompt_record_target_data_op_t target_data_op;
1374 ompt_record_target_map_t target_map;
1375 ompt_record_target_kernel_t target_kernel;
1376 ompt_record_control_tool_t control_tool;
1379
1380typedef ompt_record_ompt_t* (*ompt_get_record_ompt_t)(ompt_buffer_t* buffer,
1381 ompt_buffer_cursor_t current);
1382
1383#define ompt_id_none 0
1384#define ompt_data_none \
1385 { \
1386 0 \
1387 }
1388#define ompt_time_none 0
1389#define ompt_hwid_none 0
1390#define ompt_addr_none ~0
1391#define ompt_mutex_impl_none 0
1392#define ompt_wait_id_none 0
1393
1394#define ompd_segment_none 0
1395
1396#endif /* __OMPT__ */
int(* ompt_enumerate_states_t)(int current_state, int *next_state, const char **next_state_name)
Definition omp-tools.h:631
ompt_set_result_t(* ompt_set_callback_t)(ompt_callbacks_t event, ompt_callback_t callback)
Definition omp-tools.h:639
void(* ompt_callback_implicit_task_t)(ompt_scope_endpoint_t endpoint, ompt_data_t *parallel_data, ompt_data_t *task_data, unsigned int actual_parallelism, unsigned int index, int flags)
Definition omp-tools.h:832
ompt_task_status_t
Definition omp-tools.h:404
@ ompt_task_detach
Definition omp-tools.h:408
@ ompt_task_yield
Definition omp-tools.h:406
@ ompt_task_switch
Definition omp-tools.h:411
@ ompt_task_early_fulfill
Definition omp-tools.h:409
@ ompt_task_complete
Definition omp-tools.h:405
@ ompt_task_late_fulfill
Definition omp-tools.h:410
@ ompt_taskwait_complete
Definition omp-tools.h:412
@ ompt_task_cancel
Definition omp-tools.h:407
void(* ompt_interface_fn_t)(void)
Definition omp-tools.h:563
ompt_thread_t thread_type
Definition omp-tools.h:721
ompd_rc_t ompd_get_task_frame(ompd_task_handle_t *task_handle, ompd_frame_info_t *exit_frame, ompd_frame_info_t *enter_frame)
ompt_device_time_t start_time
Definition omp-tools.h:614
ompd_rc_t ompd_enumerate_states(ompd_address_space_handle_t *address_space_handle, ompd_word_t current_state, ompd_word_t *next_state, const char **next_state_name, ompd_word_t *more_enums)
ompt_data_t variable
Definition omp-tools.h:621
uint64_t ompd_wait_id_t
Definition omp-tools.h:524
ompd_rc_t ompd_get_icv_string_from_scope(void *handle, ompd_scope_t scope, ompd_icv_id_t icv_id, const char **icv_string)
void ompd_bp_task_end(void)
const void * codeptr_ra
Definition omp-tools.h:1008
ompd_callback_memory_alloc_fn_t alloc_memory
Definition omp-tools.h:1159
ompd_rc_t(* ompd_callback_memory_read_fn_t)(ompd_address_space_context_t *address_space_context, ompd_thread_context_t *thread_context, const ompd_address_t *addr, ompd_size_t nbytes, void *buffer)
Definition omp-tools.h:1134
ompd_rc_t ompd_get_curr_parallel_handle(ompd_thread_handle_t *thread_handle, ompd_parallel_handle_t **parallel_handle)
ompd_rc_t(* ompd_callback_device_host_fn_t)(ompd_address_space_context_t *address_space_context, const void *input, ompd_size_t unit_size, ompd_size_t count, void *output)
Definition omp-tools.h:1148
int enter_frame_flags
Definition omp-tools.h:578
ompd_callback_memory_read_fn_t read_memory
Definition omp-tools.h:1164
ompd_rc_t ompd_device_initialize(ompd_address_space_handle_t *process_handle, ompd_address_space_context_t *device_context, ompd_device_t kind, ompd_size_t sizeof_id, void *id, ompd_address_space_handle_t **device_handle)
ompd_callback_memory_write_fn_t write_memory
Definition omp-tools.h:1165
ompd_rc_t ompd_parallel_handle_compare(ompd_parallel_handle_t *parallel_handle_1, ompd_parallel_handle_t *parallel_handle_2, int *cmp_value)
ompt_finalize_t finalize
Definition omp-tools.h:606
void(* ompt_callback_task_schedule_t)(ompt_data_t *prior_task_data, ompt_task_status_t prior_task_status, ompt_data_t *next_task_data)
Definition omp-tools.h:821
ompt_mutex_t kind
Definition omp-tools.h:900
void(* ompt_callback_task_create_t)(ompt_data_t *encountering_task_data, const ompt_frame_t *encountering_task_frame, ompt_data_t *new_task_data, int flags, int has_dependences, const void *codeptr_ra)
Definition omp-tools.h:785
ompd_callback_sizeof_fn_t sizeof_type
Definition omp-tools.h:1162
int(* ompt_get_place_proc_ids_t)(int place_num, int ids_size, int *ids)
Definition omp-tools.h:649
#define FOREACH_KMP_MUTEX_IMPL(macro)
Definition omp-tools.h:95
ompd_rc_t ompd_get_thread_id(ompd_thread_handle_t *thread_handle, ompd_thread_id_t kind, ompd_size_t sizeof_thread_id, void *thread_id)
void(* ompt_callback_buffer_complete_t)(int device_num, ompt_buffer_t *buffer, unsigned long bytes, ompt_buffer_cursor_t begin, int buffer_owned)
Definition omp-tools.h:591
void(* ompt_callback_thread_end_t)(ompt_data_t *thread_data)
Definition omp-tools.h:724
ompt_scope_endpoint_t endpoint
Definition omp-tools.h:911
void ompd_bp_device_begin(void)
void(* ompt_callback_device_unload_t)(int device_num, uint64_t module_id)
Definition omp-tools.h:949
ompt_id_t task_id
Definition omp-tools.h:767
void ompd_bp_thread_begin(void)
struct _ompd_thread_cont ompd_thread_context_t
Definition omp-tools.h:1098
void(* ompt_callback_t)(void)
Definition omp-tools.h:581
ompt_initialize_t initialize
Definition omp-tools.h:605
int(* ompt_get_partition_place_nums_t)(int place_nums_size, int *place_nums)
Definition omp-tools.h:653
ompd_rc_t ompd_get_generating_task_handle(ompd_task_handle_t *task_handle, ompd_task_handle_t **generating_task_handle)
const void * codeptr_ra
Definition omp-tools.h:929
ompt_record_native_t rclass
Definition omp-tools.h:612
ompd_callback_memory_free_fn_t free_memory
Definition omp-tools.h:1160
ompt_severity_t
Definition omp-tools.h:459
@ ompt_fatal
Definition omp-tools.h:461
@ ompt_warning
Definition omp-tools.h:460
void(* ompt_callback_error_t)(ompt_severity_t severity, const char *message, unsigned long length, const void *codeptr_ra)
Definition omp-tools.h:1067
#define kmp_mutex_impl_macro(impl, code)
Definition omp-tools.h:218
double(* ompt_translate_time_t)(ompt_device_t *device, ompt_device_time_t time)
Definition omp-tools.h:684
ompt_interface_fn_t(* ompt_function_lookup_t)(const char *interface_function_name)
Definition omp-tools.h:565
int(* ompt_get_num_devices_t)(void)
Definition omp-tools.h:676
ompd_address_t frame_address
Definition omp-tools.h:1088
void * ptr
Definition omp-tools.h:570
int exit_frame_flags
Definition omp-tools.h:577
void(* ompt_callback_target_data_op_emi_t)(ompt_scope_endpoint_t endpoint, ompt_data_t *target_task_data, ompt_data_t *target_data, ompt_id_t *host_op_id, ompt_target_data_op_t optype, void *src_addr, int src_device_num, void *dest_addr, int dest_device_num, unsigned long bytes, const void *codeptr_ra)
Definition omp-tools.h:951
uint64_t ompt_device_time_t
Definition omp-tools.h:294
ompt_work_t work_type
Definition omp-tools.h:764
ompt_cancel_flag_t
Definition omp-tools.h:465
@ ompt_cancel_sections
Definition omp-tools.h:467
@ ompt_cancel_activated
Definition omp-tools.h:470
@ ompt_cancel_loop
Definition omp-tools.h:468
@ ompt_cancel_discarded_task
Definition omp-tools.h:472
@ ompt_cancel_detected
Definition omp-tools.h:471
@ ompt_cancel_parallel
Definition omp-tools.h:466
@ ompt_cancel_taskgroup
Definition omp-tools.h:469
void(* ompt_callback_target_data_op_t)(ompt_id_t target_id, ompt_id_t host_op_id, ompt_target_data_op_t optype, void *src_addr, int src_device_num, void *dest_addr, int dest_device_num, unsigned long bytes, const void *codeptr_ra)
Definition omp-tools.h:963
ompt_mutex_t
Definition omp-tools.h:367
@ ompt_mutex_critical
Definition omp-tools.h:372
@ ompt_mutex_test_lock
Definition omp-tools.h:369
@ ompt_mutex_lock
Definition omp-tools.h:368
@ ompt_mutex_ordered
Definition omp-tools.h:374
@ ompt_mutex_atomic
Definition omp-tools.h:373
@ ompt_mutex_test_nest_lock
Definition omp-tools.h:371
@ ompt_mutex_nest_lock
Definition omp-tools.h:370
ompt_dependence_type_t
Definition omp-tools.h:446
@ ompt_dependence_type_in
Definition omp-tools.h:447
@ ompt_dependence_type_out
Definition omp-tools.h:448
@ ompt_dependence_type_inout_all_memory
Definition omp-tools.h:455
@ ompt_dependence_type_sink
Definition omp-tools.h:452
@ ompt_dependence_type_inoutset
Definition omp-tools.h:453
@ ompt_dependence_type_out_all_memory
Definition omp-tools.h:454
@ ompt_dependence_type_source
Definition omp-tools.h:451
@ ompt_dependence_type_mutexinoutset
Definition omp-tools.h:450
@ ompt_dependence_type_inout
Definition omp-tools.h:449
ompd_rc_t ompd_process_initialize(ompd_address_space_context_t *context, ompd_address_space_handle_t **handle)
void(* ompt_callback_flush_t)(ompt_data_t *thread_data, const void *codeptr_ra)
Definition omp-tools.h:916
struct _ompd_thread_handle ompd_thread_handle_t
Definition omp-tools.h:1093
void ompd_dll_locations_valid(void)
ompt_severity_t severity
Definition omp-tools.h:1074
void(* ompt_callback_target_submit_t)(ompt_id_t target_id, ompt_id_t host_op_id, unsigned int requested_num_teams)
Definition omp-tools.h:1043
ompd_rc_t ompd_get_thread_handle(ompd_address_space_handle_t *handle, ompd_thread_id_t kind, ompd_size_t sizeof_thread_id, const void *thread_id, ompd_thread_handle_t **thread_handle)
ompt_parallel_flag_t
Definition omp-tools.h:428
@ ompt_parallel_invoker_runtime
Definition omp-tools.h:430
@ ompt_parallel_team
Definition omp-tools.h:432
@ ompt_parallel_invoker_program
Definition omp-tools.h:429
@ ompt_parallel_league
Definition omp-tools.h:431
const void * codeptr_ra
Definition omp-tools.h:920
ompt_id_t thread_id
Definition omp-tools.h:1351
ompt_target_map_flag_t
Definition omp-tools.h:436
@ ompt_target_map_flag_implicit
Definition omp-tools.h:442
@ ompt_target_map_flag_to
Definition omp-tools.h:437
@ ompt_target_map_flag_alloc
Definition omp-tools.h:439
@ ompt_target_map_flag_delete
Definition omp-tools.h:441
@ ompt_target_map_flag_from
Definition omp-tools.h:438
@ ompt_target_map_flag_release
Definition omp-tools.h:440
ompd_rc_t ompd_get_version_string(const char **string)
void(* ompt_finalize_tool_t)(void)
Definition omp-tools.h:678
ompt_device_time_t end_time
Definition omp-tools.h:615
ompt_set_result_t(* ompt_set_trace_ompt_t)(ompt_device_t *device, unsigned int enable, unsigned int etype)
Definition omp-tools.h:686
ompd_rc_t ompd_rel_parallel_handle(ompd_parallel_handle_t *parallel_handle)
ompt_dispatch_t kind
Definition omp-tools.h:781
void ompd_bp_parallel_end(void)
ompt_task_status_t prior_task_status
Definition omp-tools.h:828
ompt_id_t parallel_id
Definition omp-tools.h:859
int(* ompt_get_place_num_t)(void)
Definition omp-tools.h:651
struct _ompd_task_handle ompd_task_handle_t
Definition omp-tools.h:1095
unsigned int * mapping_flags
Definition omp-tools.h:1034
ompd_rc_t ompd_rel_display_control_vars(const char *const **control_vars)
void ompd_bp_thread_end(void)
int(* ompt_pause_trace_t)(ompt_device_t *device, int begin_pause)
Definition omp-tools.h:696
ompd_rc_t(* ompd_callback_memory_free_fn_t)(void *ptr)
Definition omp-tools.h:1115
void(* ompt_callback_mutex_acquire_t)(ompt_mutex_t kind, unsigned int hint, unsigned int impl, ompt_wait_id_t wait_id, const void *codeptr_ra)
Definition omp-tools.h:879
unsigned int requested_parallelism
Definition omp-tools.h:737
int(* ompt_get_num_procs_t)(void)
Definition omp-tools.h:645
int(* ompt_get_device_num_procs_t)(ompt_device_t *device)
Definition omp-tools.h:680
ompd_rc_t ompd_rel_task_handle(ompd_task_handle_t *task_handle)
int(* ompt_enumerate_mutex_impls_t)(int current_impl, int *next_impl, const char **next_impl_name)
Definition omp-tools.h:635
void(* ompt_finalize_t)(ompt_data_t *tool_data)
Definition omp-tools.h:597
uint64_t ompd_seg_t
Definition omp-tools.h:528
void(* ompt_callback_device_finalize_t)(int device_num)
Definition omp-tools.h:938
ompd_rc_t ompd_get_task_function(ompd_task_handle_t *task_handle, ompd_address_t *entry_point)
ompd_rc_t ompd_get_omp_version(ompd_address_space_handle_t *address_space, ompd_word_t *omp_version)
ompd_rc_t ompd_get_display_control_vars(ompd_address_space_handle_t *address_space_handle, const char *const **control_vars)
void(* ompt_callback_buffer_request_t)(int device_num, ompt_buffer_t **buffer, unsigned long *bytes)
Definition omp-tools.h:587
ompd_callback_get_thread_context_for_thread_id_fn_t get_thread_context_for_thread_id
Definition omp-tools.h:1169
const char * message
Definition omp-tools.h:1075
ompd_addr_t address
Definition omp-tools.h:1083
const void * codeptr_ra
Definition omp-tools.h:902
ompt_task_flag_t
Definition omp-tools.h:390
@ ompt_task_explicit
Definition omp-tools.h:393
@ ompt_task_merged
Definition omp-tools.h:400
@ ompt_task_initial
Definition omp-tools.h:391
@ ompt_task_undeferred
Definition omp-tools.h:396
@ ompt_task_target
Definition omp-tools.h:394
@ ompt_task_final
Definition omp-tools.h:398
@ ompt_task_implicit
Definition omp-tools.h:392
@ ompt_task_mergeable
Definition omp-tools.h:399
@ ompt_task_taskwait
Definition omp-tools.h:395
@ ompt_task_untied
Definition omp-tools.h:397
ompt_callback_masked_t ompt_callback_master_t
Definition omp-tools.h:854
ompt_dependence_type_t dependence_type
Definition omp-tools.h:622
void(* ompt_callback_target_map_emi_t)(ompt_data_t *target_data, unsigned int nitems, void **host_addr, void **device_addr, unsigned long *bytes, unsigned int *mapping_flags, const void *codeptr_ra)
Definition omp-tools.h:1011
void(* ompt_callback_thread_begin_t)(ompt_thread_t thread_type, ompt_data_t *thread_data)
Definition omp-tools.h:717
void(* ompt_callback_device_initialize_t)(int device_num, const char *type, ompt_device_t *device, ompt_function_lookup_t lookup, const char *documentation)
Definition omp-tools.h:932
uint64_t ompd_device_t
Definition omp-tools.h:530
void(* ompt_callback_parallel_begin_t)(ompt_data_t *encountering_task_data, const ompt_frame_t *encountering_task_frame, ompt_data_t *parallel_data, unsigned int requested_parallelism, int flags, const void *codeptr_ra)
Definition omp-tools.h:726
ompt_target_data_op_t
Definition omp-tools.h:337
@ ompt_target_data_disassociate
Definition omp-tools.h:343
@ ompt_target_data_alloc_async
Definition omp-tools.h:344
@ ompt_target_data_alloc
Definition omp-tools.h:338
@ ompt_target_data_transfer_to_device
Definition omp-tools.h:339
@ ompt_target_data_delete_async
Definition omp-tools.h:347
@ ompt_target_data_transfer_from_device_async
Definition omp-tools.h:346
@ ompt_target_data_associate
Definition omp-tools.h:342
@ ompt_target_data_delete
Definition omp-tools.h:341
@ ompt_target_data_transfer_from_device
Definition omp-tools.h:340
@ ompt_target_data_transfer_to_device_async
Definition omp-tools.h:345
ompt_sync_region_t
Definition omp-tools.h:323
@ ompt_sync_region_reduction
Definition omp-tools.h:330
@ ompt_sync_region_barrier_teams
Definition omp-tools.h:333
@ ompt_sync_region_barrier
Definition omp-tools.h:324
@ ompt_sync_region_barrier_implementation
Definition omp-tools.h:327
@ ompt_sync_region_taskgroup
Definition omp-tools.h:329
@ ompt_sync_region_barrier_implicit_parallel
Definition omp-tools.h:332
@ ompt_sync_region_taskwait
Definition omp-tools.h:328
@ ompt_sync_region_barrier_implicit_workshare
Definition omp-tools.h:331
@ ompt_sync_region_barrier_explicit
Definition omp-tools.h:326
@ ompt_sync_region_barrier_implicit
Definition omp-tools.h:325
uint64_t(* ompt_get_unique_id_t)(void)
Definition omp-tools.h:520
uint64_t ompt_buffer_cursor_t
Definition omp-tools.h:296
ompt_work_t
Definition omp-tools.h:351
@ ompt_work_single_other
Definition omp-tools.h:355
@ ompt_work_scope
Definition omp-tools.h:359
@ ompt_work_taskloop
Definition omp-tools.h:358
@ ompt_work_sections
Definition omp-tools.h:353
@ ompt_work_loop_static
Definition omp-tools.h:360
@ ompt_work_workshare
Definition omp-tools.h:356
@ ompt_work_loop
Definition omp-tools.h:352
@ ompt_work_single_executor
Definition omp-tools.h:354
@ ompt_work_loop_other
Definition omp-tools.h:363
@ ompt_work_loop_guided
Definition omp-tools.h:362
@ ompt_work_loop_dynamic
Definition omp-tools.h:361
@ ompt_work_distribute
Definition omp-tools.h:357
ompd_rc_t ompd_get_state(ompd_thread_handle_t *thread_handle, ompd_word_t *state, ompd_wait_id_t *wait_id)
kmp_mutex_impl_t
Definition omp-tools.h:217
ompt_scope_endpoint_t endpoint
Definition omp-tools.h:765
ompd_rc_t ompd_finalize(void)
ompd_rc_t ompd_get_tool_data(void *handle, ompd_scope_t scope, ompd_word_t *value, ompd_address_t *ptr)
unsigned int actual_parallelism
Definition omp-tools.h:844
ompt_device_time_t end_time
Definition omp-tools.h:1052
ompt_device_time_t end_time
Definition omp-tools.h:982
int(* ompt_get_state_t)(ompt_wait_id_t *wait_id)
Definition omp-tools.h:657
uint64_t ompt_id_t
Definition omp-tools.h:292
ompt_scope_endpoint_t endpoint
Definition omp-tools.h:1004
ompt_id_t target_id
Definition omp-tools.h:1352
ompd_rc_t ompd_get_thread_in_parallel(ompd_parallel_handle_t *parallel_handle, int thread_num, ompd_thread_handle_t **thread_handle)
int(* ompt_get_parallel_info_t)(int ancestor_level, ompt_data_t **parallel_data, int *team_size)
Definition omp-tools.h:659
int(* ompt_advance_buffer_cursor_t)(ompt_device_t *device, ompt_buffer_t *buffer, unsigned long size, ompt_buffer_cursor_t current, ompt_buffer_cursor_t *next)
Definition omp-tools.h:702
void(* ompt_callback_dispatch_t)(ompt_data_t *parallel_data, ompt_data_t *task_data, ompt_dispatch_t kind, ompt_data_t instance)
Definition omp-tools.h:772
ompt_dispatch_t
Definition omp-tools.h:314
@ ompt_dispatch_ws_loop_chunk
Definition omp-tools.h:317
@ ompt_dispatch_taskloop_chunk
Definition omp-tools.h:318
@ ompt_dispatch_section
Definition omp-tools.h:316
@ ompt_dispatch_distribute_chunk
Definition omp-tools.h:319
@ ompt_dispatch_iteration
Definition omp-tools.h:315
const void * codeptr_ra
Definition omp-tools.h:769
void ompd_bp_parallel_begin(void)
#define DEPRECATED_51
Definition omp-tools.h:30
uint64_t ompd_thread_id_t
Definition omp-tools.h:532
void(* ompt_callback_device_load_t)(int device_num, const char *filename, int64_t offset_in_file, void *vma_in_file, unsigned long bytes, void *host_addr, void *device_addr, uint64_t module_id)
Definition omp-tools.h:940
void(* ompt_callback_target_emi_t)(ompt_target_t kind, ompt_scope_endpoint_t endpoint, int device_num, ompt_data_t *task_data, ompt_data_t *target_task_data, ompt_data_t *target_data, const void *codeptr_ra)
Definition omp-tools.h:986
ompd_rc_t ompd_get_api_version(ompd_word_t *version)
ompd_seg_t segment
Definition omp-tools.h:1082
struct _ompd_aspace_cont ompd_address_space_context_t
Definition omp-tools.h:1097
ompt_callbacks_t
Definition omp-tools.h:228
@ ompt_callback_lock_init
Definition omp-tools.h:253
@ ompt_callback_device_initialize
Definition omp-tools.h:240
@ ompt_callback_sync_region
Definition omp-tools.h:252
@ ompt_callback_nest_lock
Definition omp-tools.h:257
@ ompt_callback_thread_begin
Definition omp-tools.h:229
@ ompt_callback_thread_end
Definition omp-tools.h:230
@ ompt_callback_task_schedule
Definition omp-tools.h:234
@ ompt_callback_mutex_released
Definition omp-tools.h:245
@ ompt_callback_target_emi
Definition omp-tools.h:262
@ ompt_callback_work
Definition omp-tools.h:248
@ ompt_callback_target_map_emi
Definition omp-tools.h:265
@ ompt_callback_device_unload
Definition omp-tools.h:243
@ ompt_callback_device_load
Definition omp-tools.h:242
@ ompt_callback_mutex_acquired
Definition omp-tools.h:256
@ ompt_callback_target_map
Definition omp-tools.h:251
@ ompt_callback_dependences
Definition omp-tools.h:246
@ ompt_callback_target_submit_emi
Definition omp-tools.h:264
@ ompt_callback_parallel_end
Definition omp-tools.h:232
@ ompt_callback_task_create
Definition omp-tools.h:233
@ ompt_callback_target
Definition omp-tools.h:236
@ ompt_callback_flush
Definition omp-tools.h:258
@ ompt_callback_device_finalize
Definition omp-tools.h:241
@ ompt_callback_sync_region_wait
Definition omp-tools.h:244
@ ompt_callback_dispatch
Definition omp-tools.h:261
@ ompt_callback_error
Definition omp-tools.h:266
@ ompt_callback_target_data_op
Definition omp-tools.h:237
@ ompt_callback_target_submit
Definition omp-tools.h:238
@ ompt_callback_control_tool
Definition omp-tools.h:239
@ ompt_callback_reduction
Definition omp-tools.h:260
@ ompt_callback_masked
Definition omp-tools.h:250
@ ompt_callback_mutex_acquire
Definition omp-tools.h:255
@ ompt_callback_parallel_begin
Definition omp-tools.h:231
@ ompt_callback_lock_destroy
Definition omp-tools.h:254
@ ompt_callback_target_data_op_emi
Definition omp-tools.h:263
@ ompt_callback_master
Definition omp-tools.h:249
@ ompt_callback_implicit_task
Definition omp-tools.h:235
@ ompt_callback_task_dependence
Definition omp-tools.h:247
@ ompt_callback_cancel
Definition omp-tools.h:259
struct _ompd_aspace_handle ompd_address_space_handle_t
Definition omp-tools.h:1092
ompd_rc_t ompd_get_icv_from_scope(void *handle, ompd_scope_t scope, ompd_icv_id_t icv_id, ompd_word_t *icv_value)
ompt_native_mon_flag_t
Definition omp-tools.h:378
@ ompt_native_idleness
Definition omp-tools.h:386
@ ompt_native_kernel_invocation
Definition omp-tools.h:381
@ ompt_native_runtime
Definition omp-tools.h:384
@ ompt_native_driver
Definition omp-tools.h:383
@ ompt_native_overhead
Definition omp-tools.h:385
@ ompt_native_data_motion_explicit
Definition omp-tools.h:379
@ ompt_native_data_motion_implicit
Definition omp-tools.h:380
@ ompt_native_kernel_execution
Definition omp-tools.h:382
void(* ompt_callback_work_t)(ompt_work_t work_type, ompt_scope_endpoint_t endpoint, ompt_data_t *parallel_data, ompt_data_t *task_data, uint64_t count, const void *codeptr_ra)
Definition omp-tools.h:755
ompt_record_t(* ompt_get_record_type_t)(ompt_buffer_t *buffer, ompt_buffer_cursor_t current)
Definition omp-tools.h:708
const void * codeptr_ra
Definition omp-tools.h:1077
int(* ompt_start_trace_t)(ompt_device_t *device, ompt_callback_buffer_request_t request, ompt_callback_buffer_complete_t complete)
Definition omp-tools.h:692
ompt_state_t
Definition omp-tools.h:489
@ ompt_state_wait_barrier_explicit
Definition omp-tools.h:498
@ ompt_state_wait_lock
Definition omp-tools.h:506
@ ompt_state_wait_ordered
Definition omp-tools.h:509
@ ompt_state_idle
Definition omp-tools.h:515
@ ompt_state_wait_critical
Definition omp-tools.h:507
@ ompt_state_wait_target_map
Definition omp-tools.h:512
@ ompt_state_undefined
Definition omp-tools.h:517
@ ompt_state_work_parallel
Definition omp-tools.h:491
@ ompt_state_wait_barrier_implicit
Definition omp-tools.h:497
@ ompt_state_overhead
Definition omp-tools.h:516
@ ompt_state_work_reduction
Definition omp-tools.h:492
@ ompt_state_wait_target_update
Definition omp-tools.h:513
@ ompt_state_wait_barrier_implementation
Definition omp-tools.h:499
@ ompt_state_wait_barrier_implicit_parallel
Definition omp-tools.h:495
@ ompt_state_work_serial
Definition omp-tools.h:490
@ ompt_state_wait_barrier_teams
Definition omp-tools.h:500
@ ompt_state_wait_taskwait
Definition omp-tools.h:502
@ ompt_state_wait_mutex
Definition omp-tools.h:505
@ ompt_state_wait_barrier_implicit_workshare
Definition omp-tools.h:496
@ ompt_state_wait_target
Definition omp-tools.h:511
@ ompt_state_wait_taskgroup
Definition omp-tools.h:503
@ ompt_state_wait_barrier
Definition omp-tools.h:494
@ ompt_state_wait_atomic
Definition omp-tools.h:508
uint64_t ompd_icv_id_t
Definition omp-tools.h:544
const void * codeptr_ra
Definition omp-tools.h:861
ompt_device_time_t time
Definition omp-tools.h:1350
ompd_rc_t ompd_get_omp_version_string(ompd_address_space_handle_t *address_space, const char **string)
ompd_rc_t ompd_enumerate_icvs(ompd_address_space_handle_t *handle, ompd_icv_id_t current, ompd_icv_id_t *next_id, const char **next_icv_name, ompd_scope_t *next_scope, int *more)
int(* ompt_get_num_places_t)(void)
Definition omp-tools.h:647
uint64_t ompt_wait_id_t
Definition omp-tools.h:477
ompd_rc_t(* ompd_callback_symbol_addr_fn_t)(ompd_address_space_context_t *address_space_context, ompd_thread_context_t *thread_context, const char *symbol_name, ompd_address_t *symbol_addr, const char *file_name)
Definition omp-tools.h:1127
int(* ompt_stop_trace_t)(ompt_device_t *device)
Definition omp-tools.h:700
ompt_record_native_t
Definition omp-tools.h:277
@ ompt_record_native_event
Definition omp-tools.h:279
@ ompt_record_native_info
Definition omp-tools.h:278
ompt_target_t kind
Definition omp-tools.h:1003
ompt_device_time_t(* ompt_get_device_time_t)(ompt_device_t *device)
Definition omp-tools.h:682
ompt_scope_endpoint_t
Definition omp-tools.h:307
@ ompt_scope_begin
Definition omp-tools.h:308
@ ompt_scope_end
Definition omp-tools.h:309
@ ompt_scope_beginend
Definition omp-tools.h:310
uint64_t ompd_size_t
Definition omp-tools.h:522
ompd_callback_device_host_fn_t device_to_host
Definition omp-tools.h:1167
ompd_callback_print_string_fn_t print_string
Definition omp-tools.h:1161
void(* ompt_callback_parallel_end_t)(ompt_data_t *parallel_data, ompt_data_t *encountering_task_data, int flags, const void *codeptr_ra)
Definition omp-tools.h:742
ompt_record_t
Definition omp-tools.h:270
@ ompt_record_invalid
Definition omp-tools.h:273
@ ompt_record_ompt
Definition omp-tools.h:271
@ ompt_record_native
Definition omp-tools.h:272
ompt_data_t enter_frame
Definition omp-tools.h:576
void(* ompt_callback_mutex_t)(ompt_mutex_t kind, ompt_wait_id_t wait_id, const void *codeptr_ra)
Definition omp-tools.h:894
ompt_scope_endpoint_t endpoint
Definition omp-tools.h:873
ompt_target_t
Definition omp-tools.h:416
@ ompt_target_exit_data_nowait
Definition omp-tools.h:423
@ ompt_target_update_nowait
Definition omp-tools.h:424
@ ompt_target_nowait
Definition omp-tools.h:421
@ ompt_target
Definition omp-tools.h:417
@ ompt_target_enter_data
Definition omp-tools.h:418
@ ompt_target_exit_data
Definition omp-tools.h:419
@ ompt_target_update
Definition omp-tools.h:420
@ ompt_target_enter_data_nowait
Definition omp-tools.h:422
ompt_wait_id_t wait_id
Definition omp-tools.h:912
ompt_set_result_t
Definition omp-tools.h:283
@ ompt_set_never
Definition omp-tools.h:285
@ ompt_set_impossible
Definition omp-tools.h:286
@ ompt_set_error
Definition omp-tools.h:284
@ ompt_set_always
Definition omp-tools.h:289
@ ompt_set_sometimes
Definition omp-tools.h:287
@ ompt_set_sometimes_paired
Definition omp-tools.h:288
ompd_rc_t ompd_rel_address_space_handle(ompd_address_space_handle_t *handle)
ompt_dependence_t dep
Definition omp-tools.h:808
ompd_scope_t
Definition omp-tools.h:535
@ ompd_scope_address_space
Definition omp-tools.h:537
@ ompd_scope_implicit_task
Definition omp-tools.h:540
@ ompd_scope_parallel
Definition omp-tools.h:539
@ ompd_scope_thread
Definition omp-tools.h:538
@ ompd_scope_task
Definition omp-tools.h:541
@ ompd_scope_global
Definition omp-tools.h:536
void(* ompt_callback_dependences_t)(ompt_data_t *task_data, const ompt_dependence_t *deps, int ndeps)
Definition omp-tools.h:801
ompt_scope_endpoint_t endpoint
Definition omp-tools.h:841
int(* ompt_initialize_t)(ompt_function_lookup_t lookup, int initial_device_num, ompt_data_t *tool_data)
Definition omp-tools.h:599
int(* ompt_get_task_info_t)(int ancestor_level, int *flags, ompt_data_t **task_data, ompt_frame_t **task_frame, ompt_data_t **parallel_data, int *thread_num)
Definition omp-tools.h:663
ompd_rc_t ompd_get_scheduling_task_handle(ompd_task_handle_t *task_handle, ompd_task_handle_t **scheduling_task_handle)
ompd_callback_device_host_fn_t host_to_device
Definition omp-tools.h:1168
ompd_rc_t ompd_get_curr_task_handle(ompd_thread_handle_t *thread_handle, ompd_task_handle_t **task_handle)
ompd_rc_t ompd_get_task_in_parallel(ompd_parallel_handle_t *parallel_handle, int thread_num, ompd_task_handle_t **task_handle)
union ompt_record_ompt_t::@752 record
ompt_scope_endpoint_t endpoint
Definition omp-tools.h:858
void ompt_buffer_t
Definition omp-tools.h:585
ompd_rc_t ompd_rel_thread_handle(ompd_thread_handle_t *thread_handle)
ompd_rc_t(* ompd_callback_memory_write_fn_t)(ompd_address_space_context_t *address_space_context, ompd_thread_context_t *thread_context, const ompd_address_t *addr, ompd_size_t nbytes, const void *buffer)
Definition omp-tools.h:1141
void(* ompt_callback_target_t)(ompt_target_t kind, ompt_scope_endpoint_t endpoint, int device_num, ompt_data_t *task_data, ompt_id_t target_id, const void *codeptr_ra)
Definition omp-tools.h:994
const void * codeptr_ra
Definition omp-tools.h:913
ompd_callback_symbol_addr_fn_t symbol_addr_lookup
Definition omp-tools.h:1163
ompd_rc_t ompd_get_enclosing_parallel_handle(ompd_parallel_handle_t *parallel_handle, ompd_parallel_handle_t **enclosing_parallel_handle)
void ompt_device_t
Definition omp-tools.h:583
ompd_rc_t ompd_thread_handle_compare(ompd_thread_handle_t *thread_handle_1, ompd_thread_handle_t *thread_handle_2, int *cmp_value)
int(* ompt_flush_trace_t)(ompt_device_t *device)
Definition omp-tools.h:698
uint64_t ompt_hwid_t
Definition omp-tools.h:475
int64_t ompd_word_t
Definition omp-tools.h:527
struct _ompd_parallel_handle ompd_parallel_handle_t
Definition omp-tools.h:1094
int(* ompt_callback_control_tool_t)(uint64_t command, uint64_t modifier, void *arg, const void *codeptr_ra)
Definition omp-tools.h:1055
ompt_wait_id_t wait_id
Definition omp-tools.h:901
uint64_t value
Definition omp-tools.h:569
ompt_sync_region_t kind
Definition omp-tools.h:872
ompt_callbacks_t type
Definition omp-tools.h:1349
ompt_set_result_t(* ompt_set_trace_native_t)(ompt_device_t *device, int enable, int flags)
Definition omp-tools.h:690
int(* ompt_get_callback_t)(ompt_callbacks_t event, ompt_callback_t *callback)
Definition omp-tools.h:641
ompd_rc_t
Definition omp-tools.h:547
@ ompd_rc_unsupported
Definition omp-tools.h:553
@ ompd_rc_needs_state_tracking
Definition omp-tools.h:554
@ ompd_rc_device_read_error
Definition omp-tools.h:556
@ ompd_rc_callback_error
Definition omp-tools.h:560
@ ompd_rc_nomem
Definition omp-tools.h:558
@ ompd_rc_device_write_error
Definition omp-tools.h:557
@ ompd_rc_incompatible
Definition omp-tools.h:555
@ ompd_rc_bad_input
Definition omp-tools.h:551
@ ompd_rc_error
Definition omp-tools.h:552
@ ompd_rc_stale_handle
Definition omp-tools.h:550
@ ompd_rc_unavailable
Definition omp-tools.h:549
@ ompd_rc_ok
Definition omp-tools.h:548
@ ompd_rc_incomplete
Definition omp-tools.h:559
ompd_rc_t(* ompd_callback_get_thread_context_for_thread_id_fn_t)(ompd_address_space_context_t *address_space_context, ompd_thread_id_t kind, ompd_size_t sizeof_thread_id, const void *thread_id, ompd_thread_context_t **thread_context)
Definition omp-tools.h:1117
ompd_rc_t(* ompd_callback_memory_alloc_fn_t)(ompd_size_t nbytes, void **ptr)
Definition omp-tools.h:1113
ompt_frame_flag_t
Definition omp-tools.h:480
@ ompt_frame_runtime
Definition omp-tools.h:481
@ ompt_frame_framepointer
Definition omp-tools.h:484
@ ompt_frame_application
Definition omp-tools.h:482
@ ompt_frame_stackaddress
Definition omp-tools.h:485
@ ompt_frame_cfa
Definition omp-tools.h:483
void(* ompt_callback_task_dependence_t)(ompt_data_t *src_task_data, ompt_data_t *sink_task_data)
Definition omp-tools.h:812
unsigned long * bytes
Definition omp-tools.h:1033
ompd_rc_t(* ompd_callback_sizeof_fn_t)(ompd_address_space_context_t *address_space_context, ompd_device_type_sizes_t *sizes)
Definition omp-tools.h:1124
void(* ompt_callback_nest_lock_t)(ompt_scope_endpoint_t endpoint, ompt_wait_id_t wait_id, const void *codeptr_ra)
Definition omp-tools.h:905
ompt_thread_t
Definition omp-tools.h:299
@ ompt_thread_initial
Definition omp-tools.h:300
@ ompt_thread_unknown
Definition omp-tools.h:303
@ ompt_thread_other
Definition omp-tools.h:302
@ ompt_thread_worker
Definition omp-tools.h:301
uint64_t ompd_addr_t
Definition omp-tools.h:526
void ompd_bp_task_begin(void)
void(* ompt_callback_target_map_t)(ompt_id_t target_id, unsigned int nitems, void **host_addr, void **device_addr, unsigned long *bytes, unsigned int *mapping_flags, const void *codeptr_ra)
Definition omp-tools.h:1019
ompd_rc_t ompd_get_task_parallel_handle(ompd_task_handle_t *task_handle, ompd_parallel_handle_t **task_parallel_handle)
int(* ompt_get_target_info_t)(uint64_t *device_num, ompt_id_t *target_id, ompt_id_t *host_op_id)
Definition omp-tools.h:672
ompt_id_t parallel_id
Definition omp-tools.h:766
unsigned int requested_num_teams
Definition omp-tools.h:1050
ompd_rc_t(* ompd_callback_print_string_fn_t)(const char *string, int category)
Definition omp-tools.h:1155
void(* ompt_callback_cancel_t)(ompt_data_t *task_data, int flags, const void *codeptr_ra)
Definition omp-tools.h:923
int(* ompt_get_proc_id_t)(void)
Definition omp-tools.h:655
ompt_target_data_op_t optype
Definition omp-tools.h:976
void(* ompt_callback_masked_t)(ompt_scope_endpoint_t endpoint, ompt_data_t *parallel_data, ompt_data_t *task_data, const void *codeptr_ra)
Definition omp-tools.h:849
ompd_word_t frame_flag
Definition omp-tools.h:1089
ompd_rc_t ompd_initialize(ompd_word_t api_version, const ompd_callbacks_t *callbacks)
int(* ompt_get_task_memory_t)(void **addr, unsigned long *size, int block)
Definition omp-tools.h:670
ompd_rc_t ompd_task_handle_compare(ompd_task_handle_t *task_handle_1, ompd_task_handle_t *task_handle_2, int *cmp_value)
void(* ompt_callback_sync_region_t)(ompt_sync_region_t kind, ompt_scope_endpoint_t endpoint, ompt_data_t *parallel_data, ompt_data_t *task_data, const void *codeptr_ra)
Definition omp-tools.h:864
void(* ompt_callback_target_submit_emi_t)(ompt_scope_endpoint_t endpoint, ompt_data_t *target_data, ompt_id_t *host_op_id, unsigned int requested_num_teams)
Definition omp-tools.h:1038
void ompd_bp_device_end(void)
ompt_data_t exit_frame
Definition omp-tools.h:575
unsigned long length
Definition omp-tools.h:1076
ompd_callback_memory_read_fn_t read_string
Definition omp-tools.h:1166