Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CORE: fix n deps overflow in pipelined schedule #1051

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/schedule/ucc_schedule.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2021-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* Copyright (c) 2021-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*
* See file LICENSE for terms.
*/
Expand Down Expand Up @@ -107,9 +107,9 @@ typedef struct ucc_coll_task {
/* used for lf mt progress queue */
ucc_lf_queue_elem_t lf_elem;
};
uint8_t n_deps;
Sergei-Lebedev marked this conversation as resolved.
Show resolved Hide resolved
uint8_t n_deps_satisfied;
uint8_t n_deps_base;
uint32_t n_deps;
uint32_t n_deps_satisfied;
uint32_t n_deps_base;
/* timestamp of the start time: either post or triggered_post */
double start_time;
uint32_t seq_num;
Expand Down
7 changes: 4 additions & 3 deletions src/schedule/ucc_schedule_pipelined.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2021-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* Copyright (c) 2021-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*
* See file LICENSE for terms.
*/
Expand Down Expand Up @@ -254,9 +254,10 @@ ucc_status_t ucc_dependency_handler(ucc_coll_task_t *parent,
ucc_coll_task_t *task)
{
ucc_status_t status;
uint8_t n_deps_satisfied;
uint32_t n_deps_satisfied;

n_deps_satisfied = ucc_atomic_fadd8(&task->n_deps_satisfied, 1);
n_deps_satisfied = ucc_atomic_fadd32(&task->n_deps_satisfied, 1);
ucc_assert(task->n_deps_satisfied > n_deps_satisfied);

ucc_trace_req("task %p, n_deps %d, satisfied %d", task, task->n_deps,
n_deps_satisfied);
Expand Down
Loading