-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Stabilize DeepCompile ZeRO-3 memory scheduling #8169
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
Closed
tohtana
wants to merge
11
commits into
deepspeedai:master
from
tohtana:tohtana/deepcompile-zero3-memory-stability-scheduler-standalone
Closed
Changes from 6 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
8f8f693
Scope DeepCompile compiler lifecycle ownership
tohtana 7b536c8
Stabilize DeepCompile ZeRO-3 memory scheduling
tohtana e0996bf
Merge upstream master into DeepCompile scheduler branch
tohtana 7c9a82b
Start gather recovery on sustained allocator pressure
tohtana 844b8a9
Clean up DeepCompile native state on compile failures
tohtana 5577985
Reduce DeepCompile tests to critical contracts
tohtana 6596188
Reduce DeepCompile product scaffolding
tohtana 6418bec
Merge master and document DeepCompile diagnostics
tohtana 8828019
Merge latest master test contract
tohtana 6308b7a
Remove redundant DeepCompile distributed wrappers
tohtana 34317ef
Document DeepCompile Inductor workaround
tohtana File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wondering if these new items are just test purpose only?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, these three new APIs are for testing purpose only. We need them to set or inspect the internal state of the memory pool. It doesn't look great to have these as public APIs, but I didn't have an idea about other approaches.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just curious if it is possible to do integration test rather than unit test on this level? For example, instead of writing the scaffold to test GatherBufferPool, can do a test of functions that call the natural creation of this class, e.g. calling from Z3CustomOpExecutor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that is actually how the current tests are structured. They do not construct or call
GatherBufferPooldirectly.register_graph_z3()createsZ3CustomOpExecutorwith the shared pool, and the CUDA test runs the realallgather_param,wait_allgather, andrelease_paramops.The
_for_testAPIs are limited to making the budget and allocator-pressure inputs deterministic and exposing accounting of internal values.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, your last sentence explains my confusion. OK, maybe we can call it deterministic or pre determined size etc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I think “fixed budget” is more precise because the test fixes the pool’s byte budget rather than individual buffer sizes. If we keep
for_test, how about theseset_z3_gather_buffer_pool_budget_for_test->set_z3_gather_buffer_pool_fixed_budget_for_testsetBudgetForTest->setFixedBudgetForTestupdate_z3_gather_buffer_pool_allocator_pressure_for_test->update_z3_gather_buffer_pool_allocator_pressure_for_test