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 Adaround caching bug in torch>=2.5 #3819

Merged
merged 2 commits into from
Feb 18, 2025

Conversation

quic-kyunggeu
Copy link
Contributor

Problem

The existing intermediate data caching code was very hacky and doesn't work in torch >= 2.5

module_forward_fn = inspect.currentframe().f_back
assert inspect.getframeinfo(module_forward_fn).function == '_call_impl' # forward function proxy
kwargs = module_forward_fn.f_locals['kwargs']

Solution

Removed hackiness. Save kwargs directly without assuming anything from the function signature
image

@quic-kyunggeu quic-kyunggeu merged commit fb28809 into quic:develop Feb 18, 2025
4 checks passed
@quic-kyunggeu quic-kyunggeu deleted the fix_pt25_bug branch February 18, 2025 15:48
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