Skip to content

Commit f6f8434

Browse files
committed
ADLR/megatron-lm!2418 - Bugfix in multimodal dataloader_provider
1 parent 844119f commit f6f8434

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

examples/multimodal/dataloader_provider.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,9 @@ def is_first_or_last_stage(pp_size, encoder_pipeline_model_parallel_size):
6969
return True
7070

7171
is_valid_rank = False
72-
72+
pp_rank = get_pipeline_model_parallel_rank()
7373
if encoder_pipeline_model_parallel_size == 0:
7474
# No separate pipeline stage for the vision model. Run the dataloader on the first and last pipeline stage.
75-
pp_rank = get_pipeline_model_parallel_rank()
7675
is_valid_rank = pp_rank in (0, pp_size-1)
7776
elif encoder_pipeline_model_parallel_size == 1:
7877
# Separate pipeline stage for the vision model. Run the dataloader on the first vision and LM stage and last LM stage.

0 commit comments

Comments
 (0)