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

check torch.is_grad_enabled before calling customer flash atten ops #1397

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

XiaobingSuper
Copy link
Contributor

#1383 do a torch.is_grad_enabled check to avoid temporary tensor save when doing inference, but for torch customer ops using torch.autograd.Function, the autograd is always disabled, and it will cause failed for training path.

@rocking5566
Copy link
Contributor

LGTM @tridao please merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants