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
3501fa41
"git@developer.sourcefind.cn:OpenDAS/torchaudio.git" did not exist on "30c7077b5119664a23b0d1b266ff6856a7c3d818"
Commit
3501fa41
authored
Jan 12, 2021
by
Rick Ho
Browse files
add nccl flag in setup.py
parent
dbf55073
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
pytorch/cuda/setup.py
pytorch/cuda/setup.py
+7
-8
No files found.
pytorch/cuda/setup.py
View file @
3501fa41
...
@@ -3,6 +3,11 @@ from torch.utils.cpp_extension import BuildExtension, CUDAExtension
...
@@ -3,6 +3,11 @@ from torch.utils.cpp_extension import BuildExtension, CUDAExtension
import
os
import
os
CUDA_HELPER
=
os
.
environ
.
get
(
'CUDA_HELPER'
,
'/usr/local/cuda/samples/common/inc'
)
CUDA_HELPER
=
os
.
environ
.
get
(
'CUDA_HELPER'
,
'/usr/local/cuda/samples/common/inc'
)
cxx_flags
=
[
'-I{}'
.
format
(
CUDA_HELPER
)
]
if
os
.
environ
.
get
(
'USE_NCCL'
,
'0'
)
==
'1'
:
cxx_flags
.
append
(
'-DMOE_USE_NCCL'
)
setup
(
setup
(
name
=
'moe_cuda'
,
name
=
'moe_cuda'
,
...
@@ -15,14 +20,8 @@ setup(
...
@@ -15,14 +20,8 @@ setup(
'moe_cuda_kernel.cu'
,
'moe_cuda_kernel.cu'
,
],
],
extra_compile_args
=
{
extra_compile_args
=
{
'cxx'
:
[
'cxx'
:
cxx_flags
,
'-I{}'
.
format
(
CUDA_HELPER
),
'nvcc'
:
cxx_flags
'-DMOE_USE_NCCL'
],
'nvcc'
:
[
'-I{}'
.
format
(
CUDA_HELPER
),
'-DMOE_USE_NCCL'
]
}
}
)
)
],
],
...
...
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