forked from facebookresearch/ClassyVision
-
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.
update profiler to support multiple positional inputs (facebookresear…
…ch#663) Summary: Pull Request resolved: facebookresearch#663 Currently, when profiler computes flops/activation for individual modules, it assume the forward function takes a single position argument def forward(self, x): .... In some modules, such as the `MatMul` module used in visual transformer (https://fburl.com/diffusion/0tubwixm), the forward function takes more than one argument. def forward(self, A, B): .... Therefore, this diff updates the profiler to support multiple positional inputs in the `forward` function. Reviewed By: mannatsingh Differential Revision: D25214757 fbshipit-source-id: c5d759e3244d50e1b0894f50d4bcd84e2907b97b
- Loading branch information
1 parent
bd5c260
commit 0673482
Showing
2 changed files
with
57 additions
and
13 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
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