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
49e81f33
"docs/source/en/quicktour.md" did not exist on "c18941b01ad0ea6b07d020f353d81153c632a374"
Unverified
Commit
49e81f33
authored
Sep 30, 2021
by
hclearner
Committed by
GitHub
Sep 30, 2021
Browse files
Update setup.py
parent
8ebdc789
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
setup.py
setup.py
+9
-4
No files found.
setup.py
View file @
49e81f33
import
setuptools
from
torch.utils.cpp_extension
import
BuildExtension
,
CUDAExtension
import
os
import
torch
cxx_flags
=
[]
ext_libs
=
[]
...
...
@@ -15,15 +15,20 @@ authors = [
'Qin Li'
,
]
is_rocm_pytorch
=
False
if
torch
.
__version__
>=
'1.5'
:
from
torch.utils.cpp_extension
import
ROCM_HOME
is_rocm_pytorch
=
True
if
((
torch
.
version
.
hip
is
not
None
)
and
(
ROCM_HOME
is
not
None
))
else
False
if
os
.
environ
.
get
(
'USE_NCCL'
,
'1'
)
==
'1'
:
cxx_flags
.
append
(
'-DFMOE_USE_NCCL'
)
if
os
.
environ
.
get
(
'USE_ROCM'
,
'0'
)
==
'1'
:
if
is_rocm_pytorch
:
ext_libs
.
append
(
'rccl'
)
else
:
ext_libs
.
append
(
'nccl'
)
if
os
.
environ
.
get
(
'USE_ROCM'
,
'0'
)
==
'1'
:
define_macros
=
[(
'MOE_HIP
_DIFF
'
,
None
)]
if
is_rocm_pytorch
:
define_macros
=
[(
'
F
MOE_
USE_
HIP'
,
None
)]
else
:
define_macros
=
[]
...
...
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