Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/17752
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New Failures, 2 PendingAs of commit c0031e8 with merge base b5dbfb7 ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@manuelcandales @mergennachin I think you can use this in the metal delegate |
This PR needs a
|
|
@metascroy has imported this pull request. If you are a Meta employee, you can view this in D94581516. |
larryliu0820
left a comment
There was a problem hiding this comment.
This is great! Should we turn it on by default?
Could do as follow up |
|
There's already CSE in torch fx that we can use See a draft PR on how I using (before running another fusion pass) |
Oh sorry, I merged this already. I will check of the CSE pass in torch and unify with ExecuTorch pass as follow-up. |
This introduces a CSE pass to ExecuTorch, which eliminates common subexpressions that occur in exported programs.
This pass was first developed as part of the MLX delegate (#16718) to optimize transformers, but I'm introducing it to ExecuTorch more generally because I believe it could benefit many other backends.
Examples of common subexpressions that occur in transformers:
This pass eliminates these inefficiencies without having to rewrite the model.