diff --git a/torch/csrc/cuda/nccl.h b/torch/csrc/cuda/nccl.h index 9f276f76fa..8a9062e857 100644 --- a/torch/csrc/cuda/nccl.h +++ b/torch/csrc/cuda/nccl.h @@ -19,7 +21,7 @@ namespace nccl { // Don't use them outside of these files. namespace detail { -void throw_nccl_error(ncclResult_t status); +TORCH_CUDA_API void throw_nccl_error(ncclResult_t status); static inline void NCCL_CHECK(ncclResult_t status) { if (status != ncclSuccess) {