Skip to content

Add cache to value_and_grad_partitioned #9163

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

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

Conversation

iwknow
Copy link
Contributor

@iwknow iwknow commented May 14, 2025

Add cache to value_and_grad_partitioned, which perform AOTAutograd tracing that is time consuming.
The cache is controlled by is_fn_pure. the cache key is composed of all the inputs of scan (i.e. fn, init, xs, partition_fn).

this addresses #8632

@iwknow
Copy link
Contributor Author

iwknow commented May 14, 2025

@tengyifei please review

@iwknow
Copy link
Contributor Author

iwknow commented May 16, 2025

@tengyifei a kindly ping

@tengyifei
Copy link
Collaborator

Hi @iwknow I was on vacation. I'll review this soon.

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