".github/git@developer.sourcefind.cn:OpenDAS/ollama.git" did not exist on "feedf49c717a449cedbf973b06ca97796cfaa004"
Unverified Commit 11369d67 authored by Jiezhong Qiu's avatar Jiezhong Qiu Committed by GitHub
Browse files

Merge pull request #56 from laekov/older-pytorch-compatibility

Fix pytorch compatibility issue !55
parents 7d41fe88 9170835c
...@@ -81,10 +81,15 @@ public: ...@@ -81,10 +81,15 @@ public:
if (rank == 0) { if (rank == 0) {
ncclGetUniqueId(&ncclID); ncclGetUniqueId(&ncclID);
} }
#if defined(TORCH_VERSION_MAJOR) && (TORCH_VERSION_MAJOR > 1 || \
(TORCH_VERSION_MAJOR == 1 && TORCH_VERSION_MINOR >= 8))
broadcastUniqueNCCLID(&ncclID, broadcastUniqueNCCLID(&ncclID,
c10d::OpType::SEND, c10d::OpType::SEND,
"fastmoe_nccl_comm", "fastmoe_nccl_comm",
rank); rank);
#else
broadcastUniqueNCCLID(&ncclID);
#endif
ncclComm_t comm; ncclComm_t comm;
NCCL_SAFE_CALL(ncclCommInitRank(&comm, getSize(), ncclID, rank)); NCCL_SAFE_CALL(ncclCommInitRank(&comm, getSize(), ncclID, rank));
return comm; return comm;
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include <cuda_runtime.h> #include <cuda_runtime.h>
#include <cublas_v2.h> #include <cublas_v2.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#ifndef HELPER_CUDA_H #ifndef HELPER_CUDA_H
#define HELPER_CUDA_H #define HELPER_CUDA_H
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment