-
Notifications
You must be signed in to change notification settings - Fork 25.4k
[FX] Add Interpreter and Transformer #50420
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
ea4fa19
[WIP][FX] Add Interpreter and Transformer
d14946c
Update on "[WIP][FX] Add Interpreter and Transformer"
67be6b2
Update on "[WIP][FX] Add Interpreter and Transformer"
8088e5d
Update on "[WIP][FX] Add Interpreter and Transformer"
c5fa07b
Update on "[WIP][FX] Add Interpreter and Transformer"
cd2087f
Update on "[FX] Add Interpreter and Transformer"
fdc326e
Update on "[FX] Add Interpreter and Transformer"
91e00ad
Update on "[FX] Add Interpreter and Transformer"
f046c4e
Update on "[FX] Add Interpreter and Transformer"
4c73a28
Update on "[FX] Add Interpreter and Transformer"
a2107f9
Update on "[FX] Add Interpreter and Transformer"
64d7a19
Update on "[FX] Add Interpreter and Transformer"
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update on "[WIP][FX] Add Interpreter and Transformer"
1. Codify the interpreter pattern that was used, for ex, in [shape prop](https://github.com/pytorch/pytorch/blob/c3b4b2062748ed70e689f9f9ffe670e6fa20a071/torch/fx/experimental/shape_prop.py#L7). This is a pattern users will likely find repeatedly useful so it's good to have it first-class in the API. As seen in the test cases, this makes it incredibly easy to do simple analysis and transforms like swapping out individual nodes 2. Add a small `Transformer` class that is an `Interpreter` but provides a `transform` method that yields a GraphModule from interpreting the code TODO: - [ ] Write docstrings - [ ] Write docs - [ ] Look for more places this can be used Differential Revision: [D25880330](https://our.internmc.facebook.com/intern/diff/D25880330) [ghstack-poisoned]
- Loading branch information
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You are viewing a condensed version of this merge commit. You can view the full changes here.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.