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
OpenPCDet
Commits
7ce6a2b5
Unverified
Commit
7ce6a2b5
authored
Feb 02, 2022
by
Shaoshuai Shi
Committed by
GitHub
Feb 02, 2022
Browse files
bugfixed: stuck when training with dist_train.sh, support tcp_port (#784)
parent
274c90c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
pcdet/utils/common_utils.py
pcdet/utils/common_utils.py
+3
-1
No files found.
pcdet/utils/common_utils.py
View file @
7ce6a2b5
...
...
@@ -161,9 +161,11 @@ def init_dist_slurm(tcp_port, local_rank, backend='nccl'):
def
init_dist_pytorch
(
tcp_port
,
local_rank
,
backend
=
'nccl'
):
if
mp
.
get_start_method
(
allow_none
=
True
)
is
None
:
mp
.
set_start_method
(
'spawn'
)
os
.
environ
[
'MASTER_PORT'
]
=
str
(
tcp_port
)
os
.
environ
[
'MASTER_ADDR'
]
=
'localhost'
num_gpus
=
torch
.
cuda
.
device_count
()
torch
.
cuda
.
set_device
(
local_rank
%
num_gpus
)
dist
.
init_process_group
(
backend
=
backend
,
# init_method='tcp://127.0.0.1:%d' % tcp_port,
...
...
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