From c9e7048719f813cf507eed9e2fa1c4233a1f53f6 Mon Sep 17 00:00:00 2001 From: Ilya Kryukov Date: Fri, 22 Mar 2024 11:59:58 +0100 Subject: [PATCH] TL/CUDA: fix build --- src/components/tl/cuda/Makefile.am | 1 + src/components/tl/cuda/bcast/bcast_linear.c | 16 +++++++++------- src/components/tl/cuda/tl_cuda_context.c | 16 ++++++++-------- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/components/tl/cuda/Makefile.am b/src/components/tl/cuda/Makefile.am index c5a05f9c3b..2136821b93 100644 --- a/src/components/tl/cuda/Makefile.am +++ b/src/components/tl/cuda/Makefile.am @@ -59,6 +59,7 @@ sources = \ $(allgatherv) \ $(alltoall) \ $(alltoallv) \ + $(bcast) \ $(reduce_scatter) \ $(reduce_scatterv) diff --git a/src/components/tl/cuda/bcast/bcast_linear.c b/src/components/tl/cuda/bcast/bcast_linear.c index a1f5474501..db9bdb04e5 100644 --- a/src/components/tl/cuda/bcast/bcast_linear.c +++ b/src/components/tl/cuda/bcast/bcast_linear.c @@ -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; } @@ -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); @@ -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; diff --git a/src/components/tl/cuda/tl_cuda_context.c b/src/components/tl/cuda/tl_cuda_context.c index 0adc0c3e74..2da406e02e 100644 --- a/src/components/tl/cuda/tl_cuda_context.c +++ b/src/components/tl/cuda/tl_cuda_context.c @@ -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); @@ -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,