Skip to content

Commit

Permalink
TL/CUDA: fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
ikryukov authored and Ilya Kryukov committed Mar 22, 2024
1 parent 189120d commit 7c22cb5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
1 change: 1 addition & 0 deletions src/components/tl/cuda/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ sources = \
$(allgatherv) \
$(alltoall) \
$(alltoallv) \
$(bcast) \
$(reduce_scatter) \
$(reduce_scatterv)

Expand Down
16 changes: 9 additions & 7 deletions src/components/tl/cuda/bcast/bcast_linear.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ void ucc_tl_cuda_bcast_linear_progress(ucc_coll_task_t *coll_task)
ucc_tl_cuda_task_t *task = ucc_derived_of(coll_task, ucc_tl_cuda_task_t);
ucc_tl_cuda_team_t *team = TASK_TEAM(task);
ucc_status_t st;

(void) team;
(void) st;
task->super.status = UCC_INPROGRESS;
}

Expand All @@ -40,11 +41,12 @@ ucc_status_t ucc_tl_cuda_bcast_linear_start(ucc_coll_task_t *coll_task)
ucc_coll_args_t * args = &TASK_ARGS(task);
ucc_rank_t tsize = UCC_TL_TEAM_SIZE(team);
ucc_datatype_t dt = task->allgatherv_linear.dt;
ucc_rank_t i;
size_t send_size, frag_size, ssize;

(void) tsize;
(void) args;
(void) dt;
task->bcast_linear.stage = STAGE_SYNC;
task->allgatherv_linear.sbuf = args->src.info.buffer;
// task->bcast_linear.sbuf = args->src.info.buffer;


return ucc_progress_queue_enqueue(UCC_TL_CORE_CTX(team)->pq, &task->super);
Expand Down Expand Up @@ -75,9 +77,9 @@ ucc_status_t ucc_tl_cuda_bcast_linear_init(ucc_base_coll_args_t *coll_args,
// task->allgatherv_linear.rbuf = coll_args->args.dst.info.buffer;

task->super.flags |= UCC_COLL_TASK_FLAG_EXECUTOR;
task->super.post = ucc_tl_cuda_allgatherv_linear_start;
task->super.progress = ucc_tl_cuda_allgatherv_linear_progress;
task->super.finalize = ucc_tl_cuda_allgatherv_linear_finalize;
task->super.post = ucc_tl_cuda_bcast_linear_start;
task->super.progress = ucc_tl_cuda_bcast_linear_progress;
task->super.finalize = ucc_tl_cuda_bcast_linear_finalize;
task->bar = TASK_BAR(task);

*task_p = &task->super;
Expand Down
16 changes: 8 additions & 8 deletions src/components/tl/cuda/tl_cuda_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ UCC_CLASS_INIT_FUNC(ucc_tl_cuda_context_t,
ucc_status_t status;
int num_devices;
cudaError_t cuda_st;
CUcontext cu_ctx;
CUresult cu_st;
// CUcontext cu_ctx;
// CUresult cu_st;

UCC_CLASS_CALL_SUPER_INIT(ucc_tl_context_t, &tl_cuda_config->super,
params->context);
Expand All @@ -37,12 +37,12 @@ UCC_CLASS_INIT_FUNC(ucc_tl_cuda_context_t,
return UCC_ERR_NO_RESOURCE;
}

cu_st = cuCtxGetCurrent(&cu_ctx);
if (cu_ctx == NULL || cu_st != CUDA_SUCCESS) {
tl_debug(self->super.super.lib,
"cannot create CUDA TL context without active CUDA context");
return UCC_ERR_NO_RESOURCE;
}
// cu_st = cuCtxGetCurrent(&cu_ctx);
// if (cu_ctx == NULL || cu_st != CUDA_SUCCESS) {
// tl_debug(self->super.super.lib,
// "cannot create CUDA TL context without active CUDA context");
// return UCC_ERR_NO_RESOURCE;
// }

status = ucc_mpool_init(&self->req_mp, 0, sizeof(ucc_tl_cuda_task_t), 0,
UCC_CACHE_LINE_SIZE, 8, UINT_MAX,
Expand Down

0 comments on commit 7c22cb5

Please sign in to comment.