Skip to content

Commit 2e9cf20

Browse files
committed
[OpenMP] Rename ompx_taskgraph->omp_taskgraph_experimental
This patch renames the option to enable taskgraph support in the runtime from OMPX_TASKGRAPH to OMP_TASKGRAPH_EXPERIMENTAL, to reflect the feature's official status in OpenMP 6.0, but also the feature's current work-in-progress nature.
1 parent 38c8a30 commit 2e9cf20

17 files changed

+61
-60
lines changed

openmp/runtime/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -391,9 +391,9 @@ if(LIBOMP_OMPD_SUPPORT AND ((NOT LIBOMP_OMPT_SUPPORT) OR (NOT "${CMAKE_SYSTEM_NA
391391
set(LIBOMP_OMPD_SUPPORT FALSE)
392392
endif()
393393

394-
# OMPX Taskgraph support
395-
# Whether to build with OMPX Taskgraph (e.g. task record & replay)
396-
set(LIBOMP_OMPX_TASKGRAPH FALSE CACHE BOOL "OMPX-taskgraph (task record & replay)?")
394+
# OMP Taskgraph support
395+
# Whether to build with OMP Taskgraph (e.g. task record & replay)
396+
set(LIBOMP_TASKGRAPH_EXPERIMENTAL FALSE CACHE BOOL "Experimental OMP taskgraph (task record & replay)")
397397

398398
# Error check hwloc support after config-ix has run
399399
if(LIBOMP_USE_HWLOC AND (NOT LIBOMP_HAVE_HWLOC))
@@ -464,7 +464,7 @@ if(${OPENMP_STANDALONE_BUILD})
464464
libomp_say("Use Adaptive locks -- ${LIBOMP_USE_ADAPTIVE_LOCKS}")
465465
libomp_say("Use quad precision -- ${LIBOMP_USE_QUAD_PRECISION}")
466466
libomp_say("Use Hwloc library -- ${LIBOMP_USE_HWLOC}")
467-
libomp_say("Use OMPX-taskgraph -- ${LIBOMP_OMPX_TASKGRAPH}")
467+
libomp_say("Use OMP taskgraph -- ${LIBOMP_TASKGRAPH_EXPERIMENTAL}")
468468
endif()
469469

470470
add_subdirectory(src)

openmp/runtime/src/kmp.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2627,7 +2627,7 @@ typedef struct {
26272627
} ed;
26282628
} kmp_event_t;
26292629

2630-
#if OMPX_TASKGRAPH
2630+
#if OMP_TASKGRAPH_EXPERIMENTAL
26312631
// Initial number of allocated nodes while recording
26322632
#define INIT_MAPSIZE 50
26332633

@@ -2687,7 +2687,7 @@ extern kmp_int32 __kmp_num_tdg;
26872687
typedef struct kmp_tasking_flags { /* Total struct must be exactly 32 bits */
26882688
#if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
26892689
/* Same fields as in the #else branch, but in reverse order */
2690-
#if OMPX_TASKGRAPH
2690+
#if OMP_TASKGRAPH_EXPERIMENTAL
26912691
unsigned reserved31 : 4;
26922692
unsigned onced : 1;
26932693
#else
@@ -2746,7 +2746,7 @@ typedef struct kmp_tasking_flags { /* Total struct must be exactly 32 bits */
27462746
unsigned native : 1; /* 1==gcc-compiled task, 0==intel */
27472747
unsigned target : 1;
27482748
unsigned hidden_helper : 1; /* 1 == hidden helper task */
2749-
#if OMPX_TASKGRAPH
2749+
#if OMP_TASKGRAPH_EXPERIMENTAL
27502750
unsigned onced : 1; /* 1==ran once already, 0==never ran, record & replay purposes */
27512751
unsigned reserved31 : 4; /* reserved for library use */
27522752
#else
@@ -2801,7 +2801,7 @@ struct kmp_taskdata { /* aligned during dynamic allocation */
28012801
#if OMPT_SUPPORT
28022802
ompt_task_info_t ompt_task_info;
28032803
#endif
2804-
#if OMPX_TASKGRAPH
2804+
#if OMP_TASKGRAPH_EXPERIMENTAL
28052805
bool is_taskgraph = 0; // whether the task is within a TDG
28062806
kmp_tdg_info_t *tdg; // used to associate task with a TDG
28072807
kmp_int32 td_tdg_task_id; // local task id in its TDG
@@ -4379,7 +4379,7 @@ KMP_EXPORT void __kmpc_init_nest_lock_with_hint(ident_t *loc, kmp_int32 gtid,
43794379
void **user_lock,
43804380
uintptr_t hint);
43814381

4382-
#if OMPX_TASKGRAPH
4382+
#if OMP_TASKGRAPH_EXPERIMENTAL
43834383
// Taskgraph's Record & Replay mechanism
43844384
// __kmp_tdg_is_recording: check whether a given TDG is recording
43854385
// status: the tdg's current status

openmp/runtime/src/kmp_config.h.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
#define OMPT_SUPPORT LIBOMP_OMPT_SUPPORT
4747
#cmakedefine01 LIBOMP_OMPD_SUPPORT
4848
#define OMPD_SUPPORT LIBOMP_OMPD_SUPPORT
49-
#cmakedefine01 LIBOMP_OMPX_TASKGRAPH
50-
#define OMPX_TASKGRAPH LIBOMP_OMPX_TASKGRAPH
49+
#cmakedefine01 LIBOMP_TASKGRAPH_EXPERIMENTAL
50+
#define OMP_TASKGRAPH_EXPERIMENTAL LIBOMP_TASKGRAPH_EXPERIMENTAL
5151
#cmakedefine01 LIBOMP_PROFILING_SUPPORT
5252
#define OMP_PROFILING_SUPPORT LIBOMP_PROFILING_SUPPORT
5353
#cmakedefine01 LIBOMP_OMPT_OPTIONAL

openmp/runtime/src/kmp_global.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ int __kmp_nesting_mode = 0;
551551
int __kmp_nesting_mode_nlevels = 1;
552552
int *__kmp_nesting_nth_level;
553553

554-
#if OMPX_TASKGRAPH
554+
#if OMP_TASKGRAPH_EXPERIMENTAL
555555
// TDG record & replay
556556
int __kmp_tdg_dot = 0;
557557
kmp_int32 __kmp_max_tdgs = 100;

openmp/runtime/src/kmp_settings.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1266,7 +1266,7 @@ static void __kmp_stg_parse_num_threads(char const *name, char const *value,
12661266
K_DIAG(1, ("__kmp_dflt_team_nth == %d\n", __kmp_dflt_team_nth));
12671267
} // __kmp_stg_parse_num_threads
12681268

1269-
#if OMPX_TASKGRAPH
1269+
#if OMP_TASKGRAPH_EXPERIMENTAL
12701270
static void __kmp_stg_parse_max_tdgs(char const *name, char const *value,
12711271
void *data) {
12721272
__kmp_stg_parse_int(name, value, 0, INT_MAX, &__kmp_max_tdgs);
@@ -5742,7 +5742,7 @@ static kmp_setting_t __kmp_stg_table[] = {
57425742
{"LIBOMP_NUM_HIDDEN_HELPER_THREADS",
57435743
__kmp_stg_parse_num_hidden_helper_threads,
57445744
__kmp_stg_print_num_hidden_helper_threads, NULL, 0, 0},
5745-
#if OMPX_TASKGRAPH
5745+
#if OMP_TASKGRAPH_EXPERIMENTAL
57465746
{"KMP_MAX_TDGS", __kmp_stg_parse_max_tdgs, __kmp_std_print_max_tdgs, NULL,
57475747
0, 0},
57485748
{"KMP_TDG_DOT", __kmp_stg_parse_tdg_dot, __kmp_stg_print_tdg_dot, NULL, 0,

openmp/runtime/src/kmp_taskdeps.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ static kmp_depnode_list_t *__kmp_add_node(kmp_info_t *thread,
222222
static inline void __kmp_track_dependence(kmp_int32 gtid, kmp_depnode_t *source,
223223
kmp_depnode_t *sink,
224224
kmp_task_t *sink_task) {
225-
#if OMPX_TASKGRAPH
225+
#if OMP_TASKGRAPH_EXPERIMENTAL
226226
kmp_taskdata_t *task_source = KMP_TASK_TO_TASKDATA(source->dn.task);
227227
kmp_taskdata_t *task_sink = KMP_TASK_TO_TASKDATA(sink_task);
228228
if (source->dn.task && sink_task) {
@@ -311,7 +311,7 @@ __kmp_depnode_link_successor(kmp_int32 gtid, kmp_info_t *thread,
311311
// link node as successor of list elements
312312
for (kmp_depnode_list_t *p = plist; p; p = p->next) {
313313
kmp_depnode_t *dep = p->node;
314-
#if OMPX_TASKGRAPH
314+
#if OMP_TASKGRAPH_EXPERIMENTAL
315315
kmp_tdg_status tdg_status = KMP_TDG_NONE;
316316
if (task) {
317317
kmp_taskdata_t *td = KMP_TASK_TO_TASKDATA(task);
@@ -325,7 +325,7 @@ __kmp_depnode_link_successor(kmp_int32 gtid, kmp_info_t *thread,
325325
KMP_ACQUIRE_DEPNODE(gtid, dep);
326326
if (dep->dn.task) {
327327
if (!dep->dn.successors || dep->dn.successors->node != node) {
328-
#if OMPX_TASKGRAPH
328+
#if OMP_TASKGRAPH_EXPERIMENTAL
329329
if (!(__kmp_tdg_is_recording(tdg_status)) && task)
330330
#endif
331331
__kmp_track_dependence(gtid, dep, node, task);
@@ -352,7 +352,7 @@ static inline kmp_int32 __kmp_depnode_link_successor(kmp_int32 gtid,
352352
if (!sink)
353353
return 0;
354354
kmp_int32 npredecessors = 0;
355-
#if OMPX_TASKGRAPH
355+
#if OMP_TASKGRAPH_EXPERIMENTAL
356356
kmp_tdg_status tdg_status = KMP_TDG_NONE;
357357
kmp_taskdata_t *td = KMP_TASK_TO_TASKDATA(task);
358358
if (task) {
@@ -367,7 +367,7 @@ static inline kmp_int32 __kmp_depnode_link_successor(kmp_int32 gtid,
367367
KMP_ACQUIRE_DEPNODE(gtid, sink);
368368
if (sink->dn.task) {
369369
if (!sink->dn.successors || sink->dn.successors->node != source) {
370-
#if OMPX_TASKGRAPH
370+
#if OMP_TASKGRAPH_EXPERIMENTAL
371371
if (!(__kmp_tdg_is_recording(tdg_status)) && task)
372372
#endif
373373
__kmp_track_dependence(gtid, sink, source, task);
@@ -376,7 +376,7 @@ static inline kmp_int32 __kmp_depnode_link_successor(kmp_int32 gtid,
376376
"%p\n",
377377
gtid, KMP_TASK_TO_TASKDATA(sink->dn.task),
378378
KMP_TASK_TO_TASKDATA(task)));
379-
#if OMPX_TASKGRAPH
379+
#if OMP_TASKGRAPH_EXPERIMENTAL
380380
if (__kmp_tdg_is_recording(tdg_status)) {
381381
kmp_taskdata_t *tdd = KMP_TASK_TO_TASKDATA(sink->dn.task);
382382
if (tdd->is_taskgraph) {
@@ -694,7 +694,7 @@ kmp_int32 __kmpc_omp_task_with_deps(ident_t *loc_ref, kmp_int32 gtid,
694694
kmp_info_t *thread = __kmp_threads[gtid];
695695
kmp_taskdata_t *current_task = thread->th.th_current_task;
696696

697-
#if OMPX_TASKGRAPH
697+
#if OMP_TASKGRAPH_EXPERIMENTAL
698698
// record TDG with deps
699699
if (new_taskdata->is_taskgraph &&
700700
__kmp_tdg_is_recording(new_taskdata->tdg->tdg_status)) {

openmp/runtime/src/kmp_taskdeps.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ extern void __kmpc_give_task(kmp_task_t *ptask, kmp_int32 start);
9696

9797
static inline void __kmp_release_deps(kmp_int32 gtid, kmp_taskdata_t *task) {
9898

99-
#if OMPX_TASKGRAPH
99+
#if OMP_TASKGRAPH_EXPERIMENTAL
100100
if (task->is_taskgraph && !(__kmp_tdg_is_recording(task->tdg->tdg_status))) {
101101
kmp_node_info_t *TaskInfo = &(task->tdg->record_map[task->td_tdg_task_id]);
102102

@@ -140,7 +140,7 @@ static inline void __kmp_release_deps(kmp_int32 gtid, kmp_taskdata_t *task) {
140140
gtid, task));
141141

142142
KMP_ACQUIRE_DEPNODE(gtid, node);
143-
#if OMPX_TASKGRAPH
143+
#if OMP_TASKGRAPH_EXPERIMENTAL
144144
if (!task->is_taskgraph ||
145145
(task->is_taskgraph && !__kmp_tdg_is_recording(task->tdg->tdg_status)))
146146
#endif

0 commit comments

Comments
 (0)