-
Notifications
You must be signed in to change notification settings - Fork 82
Offload activation async support #156
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
base: dev
Are you sure you want to change the base?
Conversation
| from .global_var import config | ||
| from .checkpointing import CheckpointBlockContext | ||
|
|
||
| from .distributed import all_gather, broadcast, all_reduce, send_activations, recv_activations |
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.
这些没用到,可以去掉
| ctypes.CDLL(os.path.join(path, file_so)) | ||
|
|
||
|
|
||
| def find_pre_module_helper(m): |
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.
find_pre_offload_module_helper
| module = CheckpointBlock(module) | ||
|
|
||
| module._mode = "ZERO" | ||
| module._mode = "ZERO" if module._mode == "BLOCK" else module._mode |
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.
这里可以直接去掉,现在不需要区分ZERO和BLOCK了
0500ae7 to
5dad728
Compare
add async Offload Activation for CheckpointBlock