-
Notifications
You must be signed in to change notification settings - Fork 683
Add support for splitting in_features in linear layers #8715
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
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/8715
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New FailureAs of commit b8b9d44 with merge base dfe11f0 ( NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
@cccclai can I get a review on this? |
import torch | ||
|
||
|
||
class SplitLinearModule(torch.nn.Module): |
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.
I might miss some context - I thought you said splitting linear speeds up the perf in ANE?
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.
Oh, you said in features, in the description. What did you split to get better perf?
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.
Yes, so currently landed we have ability to split up out_features in linear modules and this speeds up perf by out 30%.
This diff adds the ability to split in_features in linear modules. It did not speed up perf in the few parameters I tried, but it's nice to have this ability it landed so people can experiment further.
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.
Looks good, thank you!
This PR: