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
MMCV
Commits
95acffb9
"vscode:/vscode.git/clone" did not exist on "10acc8223f97641e32b9ff539e948547beb06dd5"
Unverified
Commit
95acffb9
authored
Dec 18, 2020
by
Wenwei Zhang
Committed by
GitHub
Dec 18, 2020
Browse files
support mpi launcher (#726)
parent
508a322f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
mmcv/runner/dist_utils.py
mmcv/runner/dist_utils.py
+5
-1
No files found.
mmcv/runner/dist_utils.py
View file @
95acffb9
...
@@ -35,7 +35,11 @@ def _init_dist_pytorch(backend, **kwargs):
...
@@ -35,7 +35,11 @@ def _init_dist_pytorch(backend, **kwargs):
def
_init_dist_mpi
(
backend
,
**
kwargs
):
def
_init_dist_mpi
(
backend
,
**
kwargs
):
raise
NotImplementedError
# TODO: use local_rank instead of rank % num_gpus
rank
=
int
(
os
.
environ
[
'OMPI_COMM_WORLD_RANK'
])
num_gpus
=
torch
.
cuda
.
device_count
()
torch
.
cuda
.
set_device
(
rank
%
num_gpus
)
dist
.
init_process_group
(
backend
=
backend
,
**
kwargs
)
def
_init_dist_slurm
(
backend
,
port
=
None
):
def
_init_dist_slurm
(
backend
,
port
=
None
):
...
...
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