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
[fx/profiler] provide a table of summary. #1634
Conversation
"which could not be found on this machine. Run `pip " | ||
"install tabulate` to install the library.") | ||
|
||
assert self._is_proped, "Please call `interp.run(input)` before calling `interp.summary()`." |
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.
we need at least run meta once before getting this summary
@@ -236,3 +242,64 @@ def propagate(self, *args): | |||
Any: The value returned from executing the Module | |||
""" | |||
return super().run(*args) | |||
|
|||
def summary(self, format: str = 'MB') -> str: |
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.
should it be unit
instead of format
?
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
What's new?
I create a
summary
method forMetaInfoProp
. Hopefully, this will help @Cypher30 debug backward memory estimations.Warnings
@Cypher30
Obviously,
nn.Linear
'sBWD_OUT
should be the same as the previous node'sFWD_OUT
.It is fairly likely that
BWD_OUT
also includes a gradient for weight and bias.