Skip to content

Details about backward hooks in stage3, why detach outputs? #932

@feifeibear

Description

@feifeibear

Dear authors,

Thank you for the awesome works. I try to learn some implementation details and come across a small question.
I doubt the meaning of the two following lines. I believe it is the same if you remove two lines and in this way, you may save some tmp memory.
https://github.com/microsoft/DeepSpeed/blob/master/deepspeed/runtime/zero/stage3.py#L503
https://github.com/microsoft/DeepSpeed/blob/master/deepspeed/runtime/zero/stage3.py#L528

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions