-
Notifications
You must be signed in to change notification settings - Fork 536
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
Conversation
…tracing that is time consuming.
@tengyifei please review |
@tengyifei a kindly ping |
Hi @iwknow I was on vacation. I'll review this soon. |
@tengyifei a kindly ping |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again for the contribution! Sorry it took so long -- the past few weeks were especially busy.
…`setUp()` to clear cache. 3. update `test_scan_computation_cache` test to count how many times the fn is called
@tengyifei updated. please review again. thanks! |
Thanks! |
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 ofscan
(i.e. fn, init, xs, partition_fn).this addresses #8632