forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[export] optimize unflattener (pytorch#115364)
Unflattening was slow on the APS FM model (which has thousands of nn.EmbeddingBag modules). Quick glance at the profile shows 75% of time in unflattening was spent copying this node list, which is immutable and globally shared. So just passing it around as a tuple yields a 4x speedup lol. Differential Revision: [D51929775](https://our.internmc.facebook.com/intern/diff/D51929775/) Pull Request resolved: pytorch#115364 Approved by: https://github.com/zhxchen17
- Loading branch information
1 parent
494cb28
commit 3d999d2
Showing
1 changed file
with
8 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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