Skip to content

Commit

Permalink
Replace assertions with if+tl_error
Browse files Browse the repository at this point in the history
  • Loading branch information
nsarka committed Dec 26, 2023
1 parent 06cea8c commit a0940d2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
15 changes: 13 additions & 2 deletions src/components/tl/ucp/allreduce/allreduce_sliding_window.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,22 @@ ucc_tl_ucp_allreduce_sliding_window_barrier(ucc_coll_task_t *coll_task)
status = ucc_tl_ucp_coll_init(&coll_args,
team,
&task->allreduce_sliding_window.barrier_task);
ucc_assert(status == UCC_OK);
if (status < 0) {
tl_error(coll_task->team->context->lib,
"failure during sliding window barrier init: %s",
ucc_status_string(status));
task->super.status = status;
return;
}

status = ucc_tl_ucp_barrier_knomial_start(
task->allreduce_sliding_window.barrier_task);
ucc_assert(status >= 0);
if (status < 0) {
tl_error(coll_task->team->context->lib,
"failure during sliding window barrier start: %s",
ucc_status_string(status));
task->super.status = status;
}
}

void ucc_tl_ucp_allreduce_sliding_window_progress(ucc_coll_task_t *coll_task)
Expand Down
1 change: 0 additions & 1 deletion src/components/tl/ucp/tl_ucp_coll.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ typedef struct ucc_tl_ucp_task {
ucc_ee_executor_t *executor;
int put_window_size;
int num_get_bufs;
int tid;
ucs_status_ptr_t *put_requests;
int service_mode;
ucc_service_coll_req_t *allgather_scoll_req;
Expand Down

0 comments on commit a0940d2

Please sign in to comment.