-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Pass tp config via hydra Signed-off-by: Jan Baczek <[email protected]> * Remove self.ub_cfgs field - it isn't used anywhere else Signed-off-by: Jan Baczek <[email protected]> * Allow tp_overlap tree substitution in hydra config Signed-off-by: Jan Baczek <[email protected]> * Add warning in case of usage of the default tp config Signed-off-by: Jan Baczek <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Signed-off-by: Jan Baczek <[email protected]> * Change warning message Signed-off-by: Jan Baczek <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Signed-off-by: Jan Baczek <[email protected]> * Add compute capability resolver Signed-off-by: Jan Baczek <[email protected]> * Bugfix Signed-off-by: Jan Baczek <[email protected]> * Fix cherry pick Signed-off-by: Jan Baczek <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: Jan Baczek <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
2e8796a
commit 18701b0
Showing
7 changed files
with
251 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
defaults: | ||
- optional [email protected]_tp_comm_overlap_cfg: | ||
|
||
name: megatron_gpt | ||
restore_from_path: null # used when starting from a .nemo file | ||
|
||
|
53 changes: 53 additions & 0 deletions
53
examples/nlp/language_modeling/conf/tp_overlap/ub_cfg_a100_h12288_tp4_mbs1_seqlen2048.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# UB communicator configurations | ||
# Model configs: A100/175B/TP4/MBS1/SeqLen2K/BF16 | ||
|
||
# Bulk overlap with AllGather | ||
qkv_dgrad: | ||
method: bulk | ||
num_sm: 2 | ||
set_sm_margin: 0 | ||
|
||
qkv_wgrad: | ||
method: bulk | ||
num_sm: 2 | ||
set_sm_margin: 0 | ||
|
||
fc1_dgrad: | ||
method: bulk | ||
num_sm: 2 | ||
set_sm_margin: 0 | ||
|
||
fc1_wgrad: | ||
method: bulk | ||
num_sm: 2 | ||
set_sm_margin: 0 | ||
|
||
## Ring-exchange overlap with AllGather | ||
qkv_fprop: | ||
method: ring_exchange | ||
aggregate: 0 | ||
|
||
proj_dgrad: | ||
method: ring_exchange | ||
aggregate: 0 | ||
|
||
fc1_fprop: | ||
method: ring_exchange | ||
aggregate: 0 | ||
|
||
fc2_dgrad: | ||
method: ring_exchange | ||
aggregate: 0 | ||
|
||
# Chunked-collective overlap with ReduceScatter | ||
proj_fprop: | ||
method: pipeline | ||
num_sm: 4 | ||
num_splits: 4 | ||
set_sm_margin: 0 | ||
|
||
fc2_fprop: | ||
method: pipeline | ||
num_sm: 4 | ||
num_splits: 4 | ||
set_sm_margin: 0 |
53 changes: 53 additions & 0 deletions
53
examples/nlp/language_modeling/conf/tp_overlap/ub_cfg_a100_h12288_tp4_mbs2_seqlen2048.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# UB communicator configurations | ||
# Model configs: A100/175B/TP4/MBS2/SeqLen2K/BF16 | ||
|
||
# Bulk overlap with AllGather | ||
qkv_dgrad: | ||
method: bulk | ||
num_sm: 2 | ||
set_sm_margin: 0 | ||
|
||
qkv_wgrad: | ||
method: bulk | ||
num_sm: 2 | ||
set_sm_margin: 0 | ||
|
||
fc1_dgrad: | ||
method: bulk | ||
num_sm: 2 | ||
set_sm_margin: 0 | ||
|
||
fc1_wgrad: | ||
method: bulk | ||
num_sm: 2 | ||
set_sm_margin: 0 | ||
|
||
## Ring-exchange overlap with AllGather | ||
qkv_fprop: | ||
method: ring_exchange | ||
aggregate: 0 | ||
|
||
proj_dgrad: | ||
method: ring_exchange | ||
aggregate: 0 | ||
|
||
fc1_fprop: | ||
method: ring_exchange | ||
aggregate: 0 | ||
|
||
fc2_dgrad: | ||
method: ring_exchange | ||
aggregate: 0 | ||
|
||
# Chunked-collective overlap with ReduceScatter | ||
proj_fprop: | ||
method: pipeline | ||
num_sm: 8 | ||
num_splits: 4 | ||
set_sm_margin: 0 | ||
|
||
fc2_fprop: | ||
method: pipeline | ||
num_sm: 4 | ||
num_splits: 4 | ||
set_sm_margin: 0 |
59 changes: 59 additions & 0 deletions
59
examples/nlp/language_modeling/conf/tp_overlap/ub_cfg_h100_h12288_tp4_mbs1_seqlen2048.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# UB communicator configurations | ||
# Model configs: H100/175B/TP4/MBS1/SeqLen2K/FP8 | ||
|
||
# Bulk overlap with AllGather / ReduceScatter | ||
qkv_dgrad: | ||
method: bulk | ||
num_sm: 4 | ||
cga_size: 2 | ||
set_sm_margin: 0 | ||
|
||
qkv_wgrad: | ||
method: bulk | ||
num_sm: 8 | ||
cga_size: 2 | ||
set_sm_margin: 0 | ||
|
||
fc1_dgrad: | ||
method: bulk | ||
num_sm: 2 | ||
cga_size: 2 | ||
set_sm_margin: 0 | ||
|
||
fc1_wgrad: | ||
method: bulk | ||
num_sm: 4 | ||
cga_size: 2 | ||
set_sm_margin: 0 | ||
|
||
## Ring-exchange overlap with AllGather | ||
qkv_fprop: | ||
method: ring_exchange | ||
aggregate: 0 | ||
|
||
proj_dgrad: | ||
method: ring_exchange | ||
aggregate: 0 | ||
|
||
fc1_fprop: | ||
method: ring_exchange | ||
aggregate: 0 | ||
|
||
fc2_dgrad: | ||
method: ring_exchange | ||
aggregate: 1 | ||
|
||
# Chunked-collective overlap with ReduceScatter | ||
proj_fprop: | ||
method: pipeline | ||
num_sm: 24 | ||
cga_size: 2 | ||
num_splits: 4 | ||
set_sm_margin: 1 | ||
|
||
fc2_fprop: | ||
method: pipeline | ||
num_sm: 20 | ||
cga_size: 2 | ||
num_splits: 4 | ||
set_sm_margin: 1 |
59 changes: 59 additions & 0 deletions
59
examples/nlp/language_modeling/conf/tp_overlap/ub_cfg_h100_h12288_tp8_mbs2_seqlen2048.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# UB communicator configurations | ||
# Model configs: H100/175B/TP8/MBS2/SeqLen2K/FP8 | ||
|
||
# Bulk overlap with AllGather | ||
qkv_dgrad: | ||
method: bulk | ||
num_sm: 8 | ||
cga_size: 2 | ||
set_sm_margin: 0 | ||
|
||
qkv_wgrad: | ||
method: bulk | ||
num_sm: 16 | ||
cga_size: 2 | ||
set_sm_margin: 0 | ||
|
||
fc1_dgrad: | ||
method: bulk | ||
num_sm: 4 | ||
cga_size: 2 | ||
set_sm_margin: 0 | ||
|
||
fc1_wgrad: | ||
method: bulk | ||
num_sm: 16 | ||
cga_size: 2 | ||
set_sm_margin: 0 | ||
|
||
## Ring-exchange overlap with AllGather | ||
qkv_fprop: | ||
method: ring_exchange | ||
aggregate: 0 | ||
|
||
proj_dgrad: | ||
method: ring_exchange | ||
aggregate: 1 | ||
|
||
fc1_fprop: | ||
method: ring_exchange | ||
aggregate: 0 | ||
|
||
fc2_dgrad: | ||
method: ring_exchange | ||
aggregate: 0 | ||
|
||
# Chunked-collective overlap with ReduceScatter | ||
proj_fprop: | ||
method: pipeline | ||
num_sm: 16 | ||
cga_size: 2 | ||
num_splits: 4 | ||
set_sm_margin: 1 | ||
|
||
fc2_fprop: | ||
method: pipeline | ||
num_sm: 24 | ||
cga_size: 2 | ||
num_splits: 4 | ||
set_sm_margin: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters