Skip to content
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

[fix] Fix the activation checkpointing when using SwiGLUPackedFusedOp #1127

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Oct 11, 2024

  1. [fix] Fix the activation checkpointing when using SwiGLUPackedFusedOp

    According to the docs (https://pytorch.org/docs/stable/autograd.html#torch.autograd.Function) forward() method should not be called directly, apply() method have to be used instead.
    After removing forward call, activation checkpointing starts working.
    warpuv committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    46d2823 View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2024

  1. [fix] Fix the activation checkpointing when using SwiGLUPackedFusedOp

    The IF conditional on the x.requires_grad state (to change the behavior between inference/training modes) changes behavior of the recomputation of the forward() method which breaks activation checkpointing
    (as on recomputation phase x is detached with requires_grad==False, and different number of tensors are saved in the save_for_backward() method).
    warpuv committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    4829d7e View commit details
    Browse the repository at this point in the history