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
[fx] Add nested checkpoint in activation checkpoint codegen #1585
Merged
Cypher30
merged 36 commits into
hpcaitech:main
from
Cypher30:feature/add_nested_checkpoint_codegen
Sep 12, 2022
Merged
[fx] Add nested checkpoint in activation checkpoint codegen #1585
Cypher30
merged 36 commits into
hpcaitech:main
from
Cypher30:feature/add_nested_checkpoint_codegen
Sep 12, 2022
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What's New?
As we need to make use of activation checkpoint solver with the setting in rotor and pofo, we might encounter the situation that we need to employ nested checkpoint, i.e. we have something in the following forms
in the upcoming solver update, the annotation process will be able to detect those structures, and each
node.activation_checkpoint
(if annotated) will be a list indicates the checkpoint label in each level, for example, the node with[0, 1, 1]
means that it belongs tocheckpoint_0_1_1
, this function will be called bycheckpoint_0_1
andcheckpoint_0_1
will be called bycheckpoint_0
, finally thecheckpoint_0
will be called byforward
.Old version of activation checkpoint codegen is also preserved as we have the following mechanism to choose which activation checkpoint to use
As currently we haven't implemented the
ColoGraphModule
for torch11, I just simply skip the test for it, the following is the test result on torch12