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] properly propagate swapped proxies in TraceSubstitutionProcessor #1632

Merged
merged 16 commits into from
Jan 14, 2025

Conversation

ali-alshaar7
Copy link
Contributor

@ali-alshaar7 ali-alshaar7 commented Jan 10, 2025

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?

fixes 1641

the swap_map used to replace proxies following substitution transforms did not properly propagate new proxies to other bsyms.

PR review

Also adds a test for a simple buffer casting/quantization transform which used to throw key errors.

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@ali-alshaar7 ali-alshaar7 force-pushed the alia/propswaps branch 4 times, most recently from 45519f0 to 50b65e2 Compare January 13, 2025 13:46
@ali-alshaar7
Copy link
Contributor Author

ali-alshaar7 commented Jan 13, 2025

Some context on the failures we're running into here:

rematerialization transforms occur at some point after the fw/bw traces have been created, where transforms have been applied onto each respective transform already.

Remat then continues to assume that these traces are still explicitly linked, which used to be true when tracesubstitution didn't properly propagate new proxies, but now that it does, the remat runs into issues.

@ali-alshaar7 ali-alshaar7 force-pushed the alia/propswaps branch 3 times, most recently from f7f1bbe to 6c97c6d Compare January 13, 2025 18:46
@ali-alshaar7 ali-alshaar7 force-pushed the alia/propswaps branch 2 times, most recently from ee5d206 to e30f6f9 Compare January 14, 2025 00:32
Copy link
Collaborator

@t-vi t-vi left a comment

Choose a reason for hiding this comment

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

Thank you @ali-alshaar7

@t-vi t-vi merged commit 424f2a8 into main Jan 14, 2025
45 checks passed
@t-vi t-vi deleted the alia/propswaps branch January 14, 2025 07:27
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.

dtype transform which creates no ops causing KeyError
2 participants