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
2d8de296
Commit
2d8de296
authored
Oct 30, 2020
by
Deepak Narayanan
Browse files
Throw exception if ring_exchange is not available when pipeline_model_parallel_size > 1
parent
7ce373f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
megatron/arguments.py
megatron/arguments.py
+4
-0
No files found.
megatron/arguments.py
View file @
2d8de296
...
...
@@ -59,6 +59,10 @@ def parse_args(extra_args_provider=None, defaults={},
args
.
pipeline_model_parallel_size
=
min
(
args
.
pipeline_model_parallel_size
,
(
args
.
world_size
//
args
.
tensor_model_parallel_size
))
if
args
.
pipeline_model_parallel_size
>
1
:
if
"ring_exchange"
not
in
dir
(
torch
.
distributed
):
raise
Exception
(
'PyTorch with torch.distributed.ring_exchange needed '
'to run pipeline MP!'
)
if
args
.
num_microbatches_in_minibatch
is
None
:
args
.
num_microbatches_in_minibatch
=
1
if
args
.
rank
==
0
:
...
...
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