From 0e95a88997ce279d89322da45e319cfa7223f3ac Mon Sep 17 00:00:00 2001 From: hitywt Date: Thu, 26 Oct 2023 07:23:49 +0000 Subject: [PATCH] fix inference build error --- paddle/phi/core/distributed/nccl_tools.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/phi/core/distributed/nccl_tools.cc b/paddle/phi/core/distributed/nccl_tools.cc index 6032e0ff63dd8..e419cfca905fa 100644 --- a/paddle/phi/core/distributed/nccl_tools.cc +++ b/paddle/phi/core/distributed/nccl_tools.cc @@ -59,7 +59,7 @@ std::string NCCLDTypeToString(ncclDataType_t dtype) { PD_NCCL_DTYPE_TO_STR(ncclFloat32, "float32"); PD_NCCL_DTYPE_TO_STR(ncclHalf, "float16"); PD_NCCL_DTYPE_TO_STR(ncclFloat16, "float16"); -#if NCCL_VERSION_CODE >= 21000 +#if NCCL_VERSION_CODE >= 21000 && CUDA_VERSION >= 11000 PD_NCCL_DTYPE_TO_STR(ncclBfloat16, "bfloat16"); #endif PD_NCCL_DTYPE_TO_STR(ncclDouble, "float64");