Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Benchmark sequence parallelism in test_transformer_engine #3546

Merged
merged 4 commits into from
Dec 10, 2024
Merged

Conversation

wujingyue
Copy link
Collaborator

@wujingyue wujingyue commented Dec 9, 2024

$ nvidia-smi -L
GPU 0: NVIDIA H100 80GB HBM3
GPU 1: NVIDIA H100 80GB HBM3
GPU 2: NVIDIA H100 80GB HBM3
GPU 3: NVIDIA H100 80GB HBM3
GPU 4: NVIDIA H100 80GB HBM3
GPU 5: NVIDIA H100 80GB HBM3
GPU 6: NVIDIA H100 80GB HBM3
GPU 7: NVIDIA H100 80GB HBM3

$ mpirun -np 8 --output-filename /tmp/test_transformer_engine pytest tests/python/test_transformer_engine.py --only-mpi

$ cat /tmp/test_transformer_engine/1/rank.0/stdout

------------------------------------------------------------------------------------------ benchmark: 4 tests ------------------------------------------------------------------------------------------
Name (time in ms)                          Min                Max               Mean             StdDev            Median                IQR            Outliers       OPS            Rounds  Iterations
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_transformer_layer[sp-forward]      2.2564 (1.0)      55.7794 (11.73)    13.2931 (3.01)     23.7547 (125.77)   2.6707 (1.05)     14.1577 (88.73)         1;1   75.2268 (0.33)          5           1
test_transformer_layer[tp-forward]      2.3941 (1.06)     18.6497 (3.92)      6.7947 (1.54)      7.0469 (37.31)    2.5476 (1.0)       8.2456 (51.68)         1;0  147.1742 (0.65)          5           1
test_transformer_layer[tp-backward]     4.2568 (1.89)      4.8231 (1.01)      4.4578 (1.01)      0.2570 (1.36)     4.2940 (1.69)      0.4091 (2.56)          1;0  224.3258 (0.99)          5           1
test_transformer_layer[sp-backward]     4.3135 (1.91)      4.7558 (1.0)       4.4221 (1.0)       0.1889 (1.0)      4.3292 (1.70)      0.1596 (1.0)           1;1  226.1393 (1.0)           5           1
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Latency is neutral as expected.

@wujingyue
Copy link
Collaborator Author

!test

@wujingyue wujingyue marked this pull request as draft December 10, 2024 20:17
@wujingyue wujingyue requested a review from cowanmeg December 10, 2024 23:41
@wujingyue wujingyue marked this pull request as ready for review December 10, 2024 23:41
Copy link
Collaborator

@cowanmeg cowanmeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Just curious how much modification is required to turn on TP/SP overlapping?

@wujingyue
Copy link
Collaborator Author

LGTM

Just curious how much modification is required to turn on TP/SP overlapping?

NVIDIA/TransformerEngine#1363

It didn't work out of the box

@wujingyue wujingyue merged commit 8c82f30 into main Dec 10, 2024
48 checks passed
@wujingyue wujingyue deleted the wjy/sp branch December 10, 2024 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants