Skip to content

Commit

Permalink
Merge branch 'jbarker-main-patch-95366' into 'main'
Browse files Browse the repository at this point in the history
Bugfix in multimodal dataloader_provider

See merge request ADLR/megatron-lm!2418
  • Loading branch information
jon-barker committed Dec 8, 2024
2 parents 43fa44c + f6f8434 commit 6dfeb25
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions examples/multimodal/dataloader_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,9 @@ def is_first_or_last_stage(pp_size, encoder_pipeline_model_parallel_size):
return True

is_valid_rank = False

pp_rank = get_pipeline_model_parallel_rank()
if encoder_pipeline_model_parallel_size == 0:
# No separate pipeline stage for the vision model. Run the dataloader on the first and last pipeline stage.
pp_rank = get_pipeline_model_parallel_rank()
is_valid_rank = pp_rank in (0, pp_size-1)
elif encoder_pipeline_model_parallel_size == 1:
# Separate pipeline stage for the vision model. Run the dataloader on the first vision and LM stage and last LM stage.
Expand Down

0 comments on commit 6dfeb25

Please sign in to comment.