From 870eb84fe5c951338c15e711ce90a69529632999 Mon Sep 17 00:00:00 2001 From: Nicholas Sielicki Date: Wed, 4 Sep 2024 13:06:48 -0700 Subject: [PATCH] fix(tuner): fix implicit conversions cpp requires explicit cast to double here. stack-info: PR: https://github.com/aws/aws-ofi-nccl/pull/573, branch: aws-nslick/stack/20 --- src/tuner/nccl_ofi_tuner.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tuner/nccl_ofi_tuner.c b/src/tuner/nccl_ofi_tuner.c index 95f227c9d..70a47a4c6 100644 --- a/src/tuner/nccl_ofi_tuner.c +++ b/src/tuner/nccl_ofi_tuner.c @@ -344,7 +344,7 @@ ncclResult_t nccl_ofi_tuner_get_coll_info(void *context, int in_out = -1; int algorithm = NCCL_ALGO_UNDEF; int protocol = NCCL_PROTO_UNDEF; - nccl_ofi_tuner_point_t p = {.x = nBytes, .y = nccl_ofi_tuner_ctx->dims.num_ranks}; + nccl_ofi_tuner_point_t p = {.x = (double)nBytes, .y = (double)nccl_ofi_tuner_ctx->dims.num_ranks}; /* Check all regions */ for (int i = 0; i < nccl_ofi_tuner_ctx->num_regions && in_out < 0; i++) { @@ -409,7 +409,7 @@ ncclResult_t nccl_ofi_tuner_get_coll_info_v2( } int in_out = -1; - nccl_ofi_tuner_point_t p = {.x = nBytes, .y = nccl_ofi_tuner_ctx->dims.num_ranks}; + nccl_ofi_tuner_point_t p = {.x = (double)nBytes, .y = (double)nccl_ofi_tuner_ctx->dims.num_ranks}; /* Check all regions */ for (int i = 0; i < nccl_ofi_tuner_ctx->num_regions && in_out < 0; i++) {