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

[WIP] Draft checkpoint interpret call #1275

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

kiya00
Copy link
Collaborator

@kiya00 kiya00 commented Oct 8, 2024

Before submitting
  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?

What does this PR do?

use _interpret_call to trace checkpoint

Comment on lines +686 to +688
@wraps(trace_of_checkpoint.python_callable())
def core_of_forward(f, *args, **kwargs):
return thunder.core.trace_interpreter.interpret_trace(trace_of_checkpoint, f, *args, **kwargs)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can this core_of_forward (but without f argument) be sent as the function-to-be-checkpointed to thunder.torch.checkpoint function from #1127? Then the rest of the custom registration could probably be dropped.

@IvanYashchuk
Copy link
Collaborator

@kiya00, please take a look at the implementation at #1256. The same pattern can be used here to finish this work.

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