-
Notifications
You must be signed in to change notification settings - Fork 13
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
Profiling #269
base: dev
Are you sure you want to change the base?
Profiling #269
Conversation
PyPi release
Outputs chrome tracing profiles, which are beautifully readable
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.
Nice, I love it! I was always wondering if there is such a functionality which can be integrated. I guess you just need to reformat and fix the typo if you feel like doing so ;)
class PyProfilingHook(Hook): | ||
'''Allows to profile your pytorch code! | ||
|
||
Best of all: It allows you to create chrome traces, which can be view |
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.
view -> viewed
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.
btw. your docstring is great and allows one to get going immediately, but if you have a link to an exhaustive documentation of the profiler you could add it, too!
This needs to be documented, otherwise it is just another awesome feature which nobody will ever know about and we will kick it out again after some time. Besides that, I love it! |
black formatting is missing |
Introducing: The Pytorch Profiling hook! Saves a trace, that can be interactively viewed via the
chrome://tracing
tool. Take a look at the attached pictures.Still on the todo list:
Image 1: Some 15 training steps. Note the validation steps every 2^n steps.
![zoom_0](https://user-images.githubusercontent.com/9572598/85345499-e8db6880-b4f2-11ea-8360-96caacbf58a8.png)
![zoom_1](https://user-images.githubusercontent.com/9572598/85345502-ea0c9580-b4f2-11ea-9c88-44cf62e71f85.png)
![zoom_2](https://user-images.githubusercontent.com/9572598/85345505-eaa52c00-b4f2-11ea-915b-53b88cd6611a.png)
Image 2: Zoom to about one step. Left: Forward pass, middle: gradient calculation, right: gradient application.
Image 3: Some Conv - Batch-Norm - ReLU layers