Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Offload activation async support#156

Open
MayDomine wants to merge 144 commits into
OpenBMB:dev from
MayDomine:tp_offload
Open

Offload activation async support #156
MayDomine wants to merge 144 commits into
OpenBMB:dev from
MayDomine:tp_offload

Conversation

@MayDomine

@MayDomine MayDomine commented Aug 29, 2023

Copy link
Copy Markdown
Collaborator

add async Offload Activation for CheckpointBlock

zhangkaihuo added 30 commits July 24, 2023 13:50
@MayDomine MayDomine requested review from Achazwl, a710128 and zkh2016 and removed request for a710128 and zkh2016 August 29, 2023 03:10
Comment thread bmtrain/block_layer.py Outdated
Comment thread bmtrain/hook_func.py
from .global_var import config
from .checkpointing import CheckpointBlockContext

from .distributed import all_gather, broadcast, all_reduce, send_activations, recv_activations

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

这些没用到,可以去掉

Comment thread bmtrain/utils.py
ctypes.CDLL(os.path.join(path, file_so))


def find_pre_module_helper(m):

Copy link
Copy Markdown
Collaborator

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

Comment thread bmtrain/block_layer.py
module = CheckpointBlock(module)

module._mode = "ZERO"
module._mode = "ZERO" if module._mode == "BLOCK" else module._mode

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

这里可以直接去掉,现在不需要区分ZERO和BLOCK了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Achazwl Achazwl Achazwl left review comments
@zkh2016 zkh2016 zkh2016 left review comments

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /