-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A graph-based pipeline splitting (#1080)
An automatic graph-based pipeline splitting algorithm. The goal of the method is to split the computation graph into stages to minimize the communication between the stages while trying to balance the computation. The optimization is done via solving a mixed-integer linear program (MILP) using `scipy`. Measuring mean batch time in sec over 50 batches (after a warmup) for various models using "manual split", "--autosplit", and the new "--graphsplit": | model | nproc-per-node | manual | autosplit | graphsplit | |--------|--------|--------|--------|--------| | pippy_bert | 2 | 0.1082 | 0.1279 | 0.1083 | | pippy_bert | 4 | 0.0670 | 0.0798 | 0.0671 | | pippy_gpt2 | 2 | 0.0388 | 0.0550 | 0.0391 | | pippy_gpt2 | 4 | 0.0201 | 0.0271 | 0.0205 | | pippy_fnet | 2 | 0.0324 | 0.0420 | 0.0323 | | pippy_fnet | 4 | 0.0221 | crash | 0.0218 | | pippy_blenderbot | 2 | 0.4805 | 0.4991 | 0.4839 | | pippy_blenderbot | 4 | 0.2421 | 0.2593 | 0.2436 | That is, the results of graph-split are almost identical to manual splitting, indicating that no manual model annotation is needed.
- Loading branch information
Showing
6 changed files
with
636 additions
and
2 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,6 +1,7 @@ | ||
__pycache__ | ||
build | ||
pippy.egg-info | ||
torchpippy.egg-info | ||
pippy/version.py | ||
dist | ||
.idea/ | ||
|
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
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
Oops, something went wrong.