Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
FastMoE
Commits
17e2a5c5
Commit
17e2a5c5
authored
Jun 28, 2021
by
Rick Ho
Browse files
fix pytorch compatibility issue !55
parent
7d41fe88
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
cuda/global_exchange.cpp
cuda/global_exchange.cpp
+5
-0
cuda/utils/helper_cuda.h
cuda/utils/helper_cuda.h
+1
-0
No files found.
cuda/global_exchange.cpp
View file @
17e2a5c5
...
@@ -81,10 +81,15 @@ public:
...
@@ -81,10 +81,15 @@ public:
if
(
rank
==
0
)
{
if
(
rank
==
0
)
{
ncclGetUniqueId
(
&
ncclID
);
ncclGetUniqueId
(
&
ncclID
);
}
}
#if defined(TORCH_VERSION) && (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
;
...
...
cuda/utils/helper_cuda.h
View file @
17e2a5c5
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment