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
Megatron-LM
Commits
6e433055
Commit
6e433055
authored
Oct 01, 2020
by
mohammad
Browse files
fix for nemo: do not initialize mpu if it is already initialized
parent
c63906a6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
megatron/initialize.py
megatron/initialize.py
+4
-1
No files found.
megatron/initialize.py
View file @
6e433055
...
@@ -123,6 +123,9 @@ def _initialize_distributed():
...
@@ -123,6 +123,9 @@ def _initialize_distributed():
# Set the model-parallel / data-parallel communicators.
# Set the model-parallel / data-parallel communicators.
if
device_count
>
0
:
if
device_count
>
0
:
if
mpu
.
model_parallel_is_initialized
():
print
(
'model parallel is already initialized'
)
else
:
mpu
.
initialize_model_parallel
(
args
.
model_parallel_size
)
mpu
.
initialize_model_parallel
(
args
.
model_parallel_size
)
...
...
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