[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. commit-id:fa62775a Reviewers: ro-i Reviewed By: ro-i Pull Request: https://github.com/llvm/llvm-project/pull/194045
This commit is contained in:
parent
38daaba8e7
commit
cced408278
17 changed files with 60 additions and 59 deletions
|
|
@ -382,9 +382,9 @@ if(LIBOMP_OMPD_SUPPORT AND ((NOT LIBOMP_OMPT_SUPPORT) OR (NOT "${CMAKE_SYSTEM_NA
|
|||
set(LIBOMP_OMPD_SUPPORT FALSE)
|
||||
endif()
|
||||
|
||||
# OMPX Taskgraph support
|
||||
# Whether to build with OMPX Taskgraph (e.g. task record & replay)
|
||||
set(LIBOMP_OMPX_TASKGRAPH FALSE CACHE BOOL "OMPX-taskgraph (task record & replay)?")
|
||||
# OMP Taskgraph support
|
||||
# Whether to build with OMP Taskgraph (e.g. task record & replay)
|
||||
set(LIBOMP_TASKGRAPH_EXPERIMENTAL FALSE CACHE BOOL "Experimental OMP taskgraph (task record & replay)")
|
||||
|
||||
# Error check hwloc support after config-ix has run
|
||||
if(LIBOMP_USE_HWLOC AND (NOT LIBOMP_HAVE_HWLOC))
|
||||
|
|
|
|||
|
|
@ -2631,7 +2631,7 @@ typedef struct {
|
|||
} ed;
|
||||
} kmp_event_t;
|
||||
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
// Initial number of allocated nodes while recording
|
||||
#define INIT_MAPSIZE 50
|
||||
|
||||
|
|
@ -2691,7 +2691,7 @@ extern kmp_int32 __kmp_num_tdg;
|
|||
typedef struct kmp_tasking_flags { /* Total struct must be exactly 32 bits */
|
||||
#if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
|
||||
/* Same fields as in the #else branch, but in reverse order */
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
unsigned reserved31 : 4;
|
||||
unsigned onced : 1;
|
||||
#else
|
||||
|
|
@ -2752,7 +2752,7 @@ typedef struct kmp_tasking_flags { /* Total struct must be exactly 32 bits */
|
|||
unsigned native : 1; /* 1==gcc-compiled task, 0==intel */
|
||||
unsigned target : 1;
|
||||
unsigned hidden_helper : 1; /* 1 == hidden helper task */
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
unsigned onced : 1; /* 1==ran once already, 0==never ran, record & replay purposes */
|
||||
unsigned reserved31 : 4; /* reserved for library use */
|
||||
#else
|
||||
|
|
@ -2807,7 +2807,7 @@ struct kmp_taskdata { /* aligned during dynamic allocation */
|
|||
#if OMPT_SUPPORT
|
||||
ompt_task_info_t ompt_task_info;
|
||||
#endif
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
bool is_taskgraph = 0; // whether the task is within a TDG
|
||||
kmp_tdg_info_t *tdg; // used to associate task with a TDG
|
||||
kmp_int32 td_tdg_task_id; // local task id in its TDG
|
||||
|
|
@ -4386,7 +4386,7 @@ KMP_EXPORT void __kmpc_init_nest_lock_with_hint(ident_t *loc, kmp_int32 gtid,
|
|||
void **user_lock,
|
||||
uintptr_t hint);
|
||||
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
// Taskgraph's Record & Replay mechanism
|
||||
// __kmp_tdg_is_recording: check whether a given TDG is recording
|
||||
// status: the tdg's current status
|
||||
|
|
|
|||
|
|
@ -46,8 +46,8 @@
|
|||
#define OMPT_SUPPORT LIBOMP_OMPT_SUPPORT
|
||||
#cmakedefine01 LIBOMP_OMPD_SUPPORT
|
||||
#define OMPD_SUPPORT LIBOMP_OMPD_SUPPORT
|
||||
#cmakedefine01 LIBOMP_OMPX_TASKGRAPH
|
||||
#define OMPX_TASKGRAPH LIBOMP_OMPX_TASKGRAPH
|
||||
#cmakedefine01 LIBOMP_TASKGRAPH_EXPERIMENTAL
|
||||
#define OMP_TASKGRAPH_EXPERIMENTAL LIBOMP_TASKGRAPH_EXPERIMENTAL
|
||||
#cmakedefine01 LIBOMP_PROFILING_SUPPORT
|
||||
#define OMP_PROFILING_SUPPORT LIBOMP_PROFILING_SUPPORT
|
||||
#cmakedefine01 LIBOMP_OMPT_OPTIONAL
|
||||
|
|
|
|||
|
|
@ -553,7 +553,7 @@ int __kmp_nesting_mode = 0;
|
|||
int __kmp_nesting_mode_nlevels = 1;
|
||||
int *__kmp_nesting_nth_level;
|
||||
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
// TDG record & replay
|
||||
int __kmp_tdg_dot = 0;
|
||||
kmp_int32 __kmp_max_tdgs = 100;
|
||||
|
|
|
|||
|
|
@ -1266,7 +1266,7 @@ static void __kmp_stg_parse_num_threads(char const *name, char const *value,
|
|||
K_DIAG(1, ("__kmp_dflt_team_nth == %d\n", __kmp_dflt_team_nth));
|
||||
} // __kmp_stg_parse_num_threads
|
||||
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
static void __kmp_stg_parse_max_tdgs(char const *name, char const *value,
|
||||
void *data) {
|
||||
__kmp_stg_parse_int(name, value, 0, INT_MAX, &__kmp_max_tdgs);
|
||||
|
|
@ -5742,7 +5742,7 @@ static kmp_setting_t __kmp_stg_table[] = {
|
|||
{"LIBOMP_NUM_HIDDEN_HELPER_THREADS",
|
||||
__kmp_stg_parse_num_hidden_helper_threads,
|
||||
__kmp_stg_print_num_hidden_helper_threads, NULL, 0, 0},
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
{"KMP_MAX_TDGS", __kmp_stg_parse_max_tdgs, __kmp_std_print_max_tdgs, NULL,
|
||||
0, 0},
|
||||
{"KMP_TDG_DOT", __kmp_stg_parse_tdg_dot, __kmp_stg_print_tdg_dot, NULL, 0,
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ static kmp_depnode_list_t *__kmp_add_node(kmp_info_t *thread,
|
|||
static inline void __kmp_track_dependence(kmp_int32 gtid, kmp_depnode_t *source,
|
||||
kmp_depnode_t *sink,
|
||||
kmp_task_t *sink_task) {
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
kmp_taskdata_t *task_source = KMP_TASK_TO_TASKDATA(source->dn.task);
|
||||
kmp_taskdata_t *task_sink = KMP_TASK_TO_TASKDATA(sink_task);
|
||||
if (source->dn.task && sink_task) {
|
||||
|
|
@ -311,7 +311,7 @@ __kmp_depnode_link_successor(kmp_int32 gtid, kmp_info_t *thread,
|
|||
// link node as successor of list elements
|
||||
for (kmp_depnode_list_t *p = plist; p; p = p->next) {
|
||||
kmp_depnode_t *dep = p->node;
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
kmp_tdg_status tdg_status = KMP_TDG_NONE;
|
||||
if (task) {
|
||||
kmp_taskdata_t *td = KMP_TASK_TO_TASKDATA(task);
|
||||
|
|
@ -325,7 +325,7 @@ __kmp_depnode_link_successor(kmp_int32 gtid, kmp_info_t *thread,
|
|||
KMP_ACQUIRE_DEPNODE(gtid, dep);
|
||||
if (dep->dn.task) {
|
||||
if (!dep->dn.successors || dep->dn.successors->node != node) {
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
if (!(__kmp_tdg_is_recording(tdg_status)) && task)
|
||||
#endif
|
||||
__kmp_track_dependence(gtid, dep, node, task);
|
||||
|
|
@ -352,7 +352,7 @@ static inline kmp_int32 __kmp_depnode_link_successor(kmp_int32 gtid,
|
|||
if (!sink)
|
||||
return 0;
|
||||
kmp_int32 npredecessors = 0;
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
kmp_tdg_status tdg_status = KMP_TDG_NONE;
|
||||
kmp_taskdata_t *td = KMP_TASK_TO_TASKDATA(task);
|
||||
if (task) {
|
||||
|
|
@ -367,7 +367,7 @@ static inline kmp_int32 __kmp_depnode_link_successor(kmp_int32 gtid,
|
|||
KMP_ACQUIRE_DEPNODE(gtid, sink);
|
||||
if (sink->dn.task) {
|
||||
if (!sink->dn.successors || sink->dn.successors->node != source) {
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
if (!(__kmp_tdg_is_recording(tdg_status)) && task)
|
||||
#endif
|
||||
__kmp_track_dependence(gtid, sink, source, task);
|
||||
|
|
@ -376,7 +376,7 @@ static inline kmp_int32 __kmp_depnode_link_successor(kmp_int32 gtid,
|
|||
"%p\n",
|
||||
gtid, KMP_TASK_TO_TASKDATA(sink->dn.task),
|
||||
KMP_TASK_TO_TASKDATA(task)));
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
if (__kmp_tdg_is_recording(tdg_status)) {
|
||||
kmp_taskdata_t *tdd = KMP_TASK_TO_TASKDATA(sink->dn.task);
|
||||
if (tdd->is_taskgraph) {
|
||||
|
|
@ -694,7 +694,7 @@ kmp_int32 __kmpc_omp_task_with_deps(ident_t *loc_ref, kmp_int32 gtid,
|
|||
kmp_info_t *thread = __kmp_threads[gtid];
|
||||
kmp_taskdata_t *current_task = thread->th.th_current_task;
|
||||
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
// record TDG with deps
|
||||
if (new_taskdata->is_taskgraph &&
|
||||
__kmp_tdg_is_recording(new_taskdata->tdg->tdg_status)) {
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ extern void __kmpc_give_task(kmp_task_t *ptask, kmp_int32 start);
|
|||
|
||||
static inline void __kmp_release_deps(kmp_int32 gtid, kmp_taskdata_t *task) {
|
||||
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
if (task->is_taskgraph && !(__kmp_tdg_is_recording(task->tdg->tdg_status))) {
|
||||
kmp_node_info_t *TaskInfo = &(task->tdg->record_map[task->td_tdg_task_id]);
|
||||
|
||||
|
|
@ -140,7 +140,7 @@ static inline void __kmp_release_deps(kmp_int32 gtid, kmp_taskdata_t *task) {
|
|||
gtid, task));
|
||||
|
||||
KMP_ACQUIRE_DEPNODE(gtid, node);
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
if (!task->is_taskgraph ||
|
||||
(task->is_taskgraph && !__kmp_tdg_is_recording(task->tdg->tdg_status)))
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ static void __kmp_alloc_task_deque(kmp_info_t *thread,
|
|||
static int __kmp_realloc_task_threads_data(kmp_info_t *thread,
|
||||
kmp_task_team_t *task_team);
|
||||
static void __kmp_bottom_half_finish_proxy(kmp_int32 gtid, kmp_task_t *ptask);
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
static kmp_tdg_info_t *__kmp_find_tdg(kmp_int32 tdg_id);
|
||||
int __kmp_taskloop_task(int gtid, void *ptask);
|
||||
#endif
|
||||
|
|
@ -70,7 +70,7 @@ static bool __kmp_task_is_allowed(int gtid, const kmp_int32 is_constrained,
|
|||
}
|
||||
// Check mutexinoutset dependencies, acquire locks
|
||||
kmp_depnode_t *node = tasknew->td_depnode;
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
if (!tasknew->is_taskgraph && UNLIKELY(node && (node->dn.mtx_num_locks > 0))) {
|
||||
#else
|
||||
if (UNLIKELY(node && (node->dn.mtx_num_locks > 0))) {
|
||||
|
|
@ -665,7 +665,7 @@ static void __kmp_free_task(kmp_int32 gtid, kmp_taskdata_t *taskdata,
|
|||
task->data2.priority = 0;
|
||||
|
||||
taskdata->td_flags.freed = 1;
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
// do not free tasks in taskgraph
|
||||
if (!taskdata->is_taskgraph) {
|
||||
#endif
|
||||
|
|
@ -675,7 +675,7 @@ static void __kmp_free_task(kmp_int32 gtid, kmp_taskdata_t *taskdata,
|
|||
#else /* ! USE_FAST_MEMORY */
|
||||
__kmp_thread_free(thread, taskdata);
|
||||
#endif
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
} else {
|
||||
taskdata->td_flags.complete = 0;
|
||||
taskdata->td_flags.started = 0;
|
||||
|
|
@ -779,7 +779,7 @@ static bool __kmp_track_children_task(kmp_taskdata_t *taskdata) {
|
|||
flags.detachable == TASK_DETACHABLE || flags.hidden_helper;
|
||||
ret = ret ||
|
||||
KMP_ATOMIC_LD_ACQ(&taskdata->td_parent->td_incomplete_child_tasks) > 0;
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
if (taskdata->td_taskgroup && taskdata->is_taskgraph)
|
||||
ret = ret || KMP_ATOMIC_LD_ACQ(&taskdata->td_taskgroup->count) > 0;
|
||||
#endif
|
||||
|
|
@ -802,7 +802,7 @@ static void __kmp_task_finish(kmp_int32 gtid, kmp_task_t *task,
|
|||
kmp_info_t *thread = __kmp_threads[gtid];
|
||||
kmp_task_team_t *task_team =
|
||||
thread->th.th_task_team; // might be NULL for serial teams...
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
// to avoid seg fault when we need to access taskdata->td_flags after free when using vanilla taskloop
|
||||
bool is_taskgraph;
|
||||
#endif
|
||||
|
|
@ -815,7 +815,7 @@ static void __kmp_task_finish(kmp_int32 gtid, kmp_task_t *task,
|
|||
|
||||
KMP_DEBUG_ASSERT(taskdata->td_flags.tasktype == TASK_EXPLICIT);
|
||||
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
is_taskgraph = taskdata->is_taskgraph;
|
||||
#endif
|
||||
|
||||
|
|
@ -923,7 +923,7 @@ static void __kmp_task_finish(kmp_int32 gtid, kmp_task_t *task,
|
|||
|
||||
if (completed) {
|
||||
taskdata->td_flags.complete = 1; // mark the task as completed
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
taskdata->td_flags.onced = 1; // mark the task as ran once already
|
||||
#endif
|
||||
|
||||
|
|
@ -942,7 +942,7 @@ static void __kmp_task_finish(kmp_int32 gtid, kmp_task_t *task,
|
|||
#endif
|
||||
KMP_ATOMIC_DEC(&taskdata->td_parent->td_incomplete_child_tasks);
|
||||
KMP_DEBUG_ASSERT(children >= 0);
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
if (taskdata->td_taskgroup && !taskdata->is_taskgraph)
|
||||
#else
|
||||
if (taskdata->td_taskgroup)
|
||||
|
|
@ -985,7 +985,7 @@ static void __kmp_task_finish(kmp_int32 gtid, kmp_task_t *task,
|
|||
// KMP_DEBUG_ASSERT( resumed_task->td_flags.executing == 0 );
|
||||
resumed_task->td_flags.executing = 1; // resume previous task
|
||||
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
if (is_taskgraph && __kmp_track_children_task(taskdata) &&
|
||||
taskdata->td_taskgroup) {
|
||||
// TDG: we only release taskgroup barrier here because
|
||||
|
|
@ -1113,7 +1113,7 @@ void __kmp_init_implicit_task(ident_t *loc_ref, kmp_info_t *this_thr,
|
|||
task->td_flags.executing = 1;
|
||||
task->td_flags.complete = 0;
|
||||
task->td_flags.freed = 0;
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
task->td_flags.onced = 0;
|
||||
#endif
|
||||
|
||||
|
|
@ -1159,7 +1159,7 @@ void __kmp_finish_implicit_task(kmp_info_t *thread) {
|
|||
if (task->td_dephash) {
|
||||
int children;
|
||||
task->td_flags.complete = 1;
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
task->td_flags.onced = 1;
|
||||
#endif
|
||||
children = KMP_ATOMIC_LD_ACQ(&task->td_incomplete_child_tasks);
|
||||
|
|
@ -1390,7 +1390,7 @@ kmp_task_t *__kmp_task_alloc(ident_t *loc_ref, kmp_int32 gtid,
|
|||
taskdata->td_flags.executing = 0;
|
||||
taskdata->td_flags.complete = 0;
|
||||
taskdata->td_flags.freed = 0;
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
taskdata->td_flags.onced = 0;
|
||||
taskdata->is_taskgraph = 0;
|
||||
taskdata->tdg = nullptr;
|
||||
|
|
@ -1430,7 +1430,7 @@ kmp_task_t *__kmp_task_alloc(ident_t *loc_ref, kmp_int32 gtid,
|
|||
}
|
||||
}
|
||||
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
kmp_tdg_info_t *tdg = __kmp_find_tdg(__kmp_curr_tdg_idx);
|
||||
if (tdg && __kmp_tdg_is_recording(tdg->tdg_status) &&
|
||||
(task_entry != (kmp_routine_entry_t)__kmp_taskloop_task)) {
|
||||
|
|
@ -1807,7 +1807,7 @@ kmp_int32 __kmp_omp_task(kmp_int32 gtid, kmp_task_t *new_task,
|
|||
bool serialize_immediate) {
|
||||
kmp_taskdata_t *new_taskdata = KMP_TASK_TO_TASKDATA(new_task);
|
||||
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
if (new_taskdata->is_taskgraph &&
|
||||
__kmp_tdg_is_recording(new_taskdata->tdg->tdg_status)) {
|
||||
kmp_tdg_info_t *tdg = new_taskdata->tdg;
|
||||
|
|
@ -2376,7 +2376,7 @@ the reduction either does not use omp_orig object, or the omp_orig is accessible
|
|||
without help of the runtime library.
|
||||
*/
|
||||
void *__kmpc_task_reduction_init(int gtid, int num, void *data) {
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
kmp_tdg_info_t *tdg = __kmp_find_tdg(__kmp_curr_tdg_idx);
|
||||
if (tdg && __kmp_tdg_is_recording(tdg->tdg_status)) {
|
||||
kmp_tdg_info_t *this_tdg = __kmp_global_tdgs[__kmp_curr_tdg_idx];
|
||||
|
|
@ -2403,7 +2403,7 @@ Note: this entry supposes the optional compiler-generated initializer routine
|
|||
has two parameters, pointer to object to be initialized and pointer to omp_orig
|
||||
*/
|
||||
void *__kmpc_taskred_init(int gtid, int num, void *data) {
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
kmp_tdg_info_t *tdg = __kmp_find_tdg(__kmp_curr_tdg_idx);
|
||||
if (tdg && __kmp_tdg_is_recording(tdg->tdg_status)) {
|
||||
kmp_tdg_info_t *this_tdg = __kmp_global_tdgs[__kmp_curr_tdg_idx];
|
||||
|
|
@ -2460,7 +2460,7 @@ void *__kmpc_task_reduction_get_th_data(int gtid, void *tskgrp, void *data) {
|
|||
kmp_int32 num;
|
||||
kmp_int32 tid = thread->th.th_info.ds.ds_tid;
|
||||
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
if ((thread->th.th_current_task->is_taskgraph) &&
|
||||
(!__kmp_tdg_is_recording(
|
||||
__kmp_global_tdgs[__kmp_curr_tdg_idx]->tdg_status))) {
|
||||
|
|
@ -4238,7 +4238,7 @@ static void __kmp_first_top_half_finish_proxy(kmp_taskdata_t *taskdata) {
|
|||
KMP_DEBUG_ASSERT(taskdata->td_flags.freed == 0);
|
||||
|
||||
taskdata->td_flags.complete = 1; // mark the task as completed
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
taskdata->td_flags.onced = 1;
|
||||
#endif
|
||||
|
||||
|
|
@ -4443,8 +4443,9 @@ void __kmp_fulfill_event(kmp_event_t *event) {
|
|||
// indicating whether we need to update task->td_task_id
|
||||
// returns: a pointer to the allocated kmp_task_t structure (task).
|
||||
kmp_task_t *__kmp_task_dup_alloc(kmp_info_t *thread, kmp_task_t *task_src
|
||||
#if OMPX_TASKGRAPH
|
||||
, int taskloop_recur
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
,
|
||||
int taskloop_recur
|
||||
#endif
|
||||
) {
|
||||
kmp_task_t *task;
|
||||
|
|
@ -4474,7 +4475,7 @@ kmp_task_t *__kmp_task_dup_alloc(kmp_info_t *thread, kmp_task_t *task_src
|
|||
task = KMP_TASKDATA_TO_TASK(taskdata);
|
||||
|
||||
// Initialize new task (only specific fields not affected by memcpy)
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
if (taskdata->is_taskgraph && !taskloop_recur &&
|
||||
__kmp_tdg_is_recording(taskdata_src->tdg->tdg_status))
|
||||
taskdata->td_tdg_task_id = KMP_ATOMIC_INC(&__kmp_tdg_task_id);
|
||||
|
|
@ -4707,7 +4708,7 @@ void __kmp_taskloop_linear(ident_t *loc, int gtid, kmp_task_t *task,
|
|||
}
|
||||
}
|
||||
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
next_task = __kmp_task_dup_alloc(thread, task, /* taskloop_recur */ 0);
|
||||
#else
|
||||
next_task = __kmp_task_dup_alloc(thread, task); // allocate new task
|
||||
|
|
@ -4909,7 +4910,7 @@ void __kmp_taskloop_recur(ident_t *loc, int gtid, kmp_task_t *task,
|
|||
lb1 = ub0 + st;
|
||||
|
||||
// create pattern task for 2nd half of the loop
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
next_task = __kmp_task_dup_alloc(thread, task,
|
||||
/* taskloop_recur */ 1);
|
||||
#else
|
||||
|
|
@ -4947,7 +4948,7 @@ void __kmp_taskloop_recur(ident_t *loc, int gtid, kmp_task_t *task,
|
|||
p->codeptr_ra = codeptr_ra;
|
||||
#endif
|
||||
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
kmp_taskdata_t *new_task_data = KMP_TASK_TO_TASKDATA(new_task);
|
||||
new_task_data->tdg = taskdata->tdg;
|
||||
new_task_data->is_taskgraph = 0;
|
||||
|
|
@ -4992,7 +4993,7 @@ static void __kmp_taskloop(ident_t *loc, int gtid, kmp_task_t *task, int if_val,
|
|||
__kmpc_taskgroup(loc, gtid);
|
||||
}
|
||||
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
KMP_ATOMIC_DEC(&__kmp_tdg_task_id);
|
||||
#endif
|
||||
// =========================================================================
|
||||
|
|
@ -5243,7 +5244,7 @@ bool __kmpc_omp_has_task_team(kmp_int32 gtid) {
|
|||
return taskdata->td_task_team != NULL;
|
||||
}
|
||||
|
||||
#if OMPX_TASKGRAPH
|
||||
#if OMP_TASKGRAPH_EXPERIMENTAL
|
||||
// __kmp_find_tdg: identify a TDG through its ID
|
||||
// tdg_id: ID of the TDG
|
||||
// returns: If a TDG corresponding to this ID is found and not
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ update_test_compiler_features()
|
|||
pythonize_bool(LIBOMP_USE_HWLOC)
|
||||
pythonize_bool(LIBOMP_OMPT_SUPPORT)
|
||||
pythonize_bool(LIBOMP_OMPT_OPTIONAL)
|
||||
pythonize_bool(LIBOMP_OMPX_TASKGRAPH)
|
||||
pythonize_bool(LIBOMP_TASKGRAPH_EXPERIMENTAL)
|
||||
pythonize_bool(LIBOMP_HAVE_LIBM)
|
||||
pythonize_bool(LIBOMP_HAVE_LIBATOMIC)
|
||||
pythonize_bool(OPENMP_TEST_COMPILER_HAS_OMIT_FRAME_POINTER_FLAGS)
|
||||
|
|
|
|||
|
|
@ -124,8 +124,8 @@ if config.has_ompt:
|
|||
# for callback.h
|
||||
config.test_flags += " -I " + config.test_source_root + "/ompt"
|
||||
|
||||
if config.has_ompx_taskgraph:
|
||||
config.available_features.add("ompx_taskgraph")
|
||||
if config.has_omp_taskgraph_experimental:
|
||||
config.available_features.add("omp_taskgraph_experimental")
|
||||
|
||||
if config.operating_system == 'AIX':
|
||||
config.available_features.add("aix")
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ config.target_triple = "@LLVM_TARGET_TRIPLE@"
|
|||
config.hwloc_library_dir = "@LIBOMP_HWLOC_LIBRARY_DIR@"
|
||||
config.using_hwloc = @LIBOMP_USE_HWLOC@
|
||||
config.has_ompt = @LIBOMP_OMPT_SUPPORT@ and @LIBOMP_OMPT_OPTIONAL@
|
||||
config.has_ompx_taskgraph = @LIBOMP_OMPX_TASKGRAPH@
|
||||
config.has_omp_taskgraph_experimental = @LIBOMP_TASKGRAPH_EXPERIMENTAL@
|
||||
config.has_libm = @LIBOMP_HAVE_LIBM@
|
||||
config.has_libatomic = @LIBOMP_HAVE_LIBATOMIC@
|
||||
config.has_omit_frame_pointer_flag = @OPENMP_TEST_COMPILER_HAS_OMIT_FRAME_POINTER_FLAGS@
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// REQUIRES: ompx_taskgraph
|
||||
// REQUIRES: omp_taskgraph_experimental
|
||||
// RUN: %libomp-cxx-compile-and-run
|
||||
#include <iostream>
|
||||
#include <cassert>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// REQUIRES: ompx_taskgraph
|
||||
// REQUIRES: omp_taskgraph_experimental
|
||||
// RUN: %libomp-cxx-compile-and-run
|
||||
#include <iostream>
|
||||
#include <cassert>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// REQUIRES: ompx_taskgraph
|
||||
// REQUIRES: omp_taskgraph_experimental
|
||||
// RUN: %libomp-cxx-compile-and-run
|
||||
#include <omp.h>
|
||||
#include <cassert>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// REQUIRES: ompx_taskgraph
|
||||
// REQUIRES: omp_taskgraph_experimental
|
||||
// RUN: %libomp-cxx-compile-and-run
|
||||
#include <iostream>
|
||||
#include <cassert>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// REQUIRES: ompx_taskgraph
|
||||
// REQUIRES: omp_taskgraph_experimental
|
||||
// RUN: %libomp-cxx-compile-and-run
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// REQUIRES: ompx_taskgraph
|
||||
// REQUIRES: omp_taskgraph_experimental
|
||||
// RUN: %libomp-cxx-compile-and-run
|
||||
#include <iostream>
|
||||
#include <cassert>
|
||||
|
|
|
|||
Loading…
Reference in a new issue