-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Improve autograd profiler performance #11773
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
d2eaf15 to
6c2a36b
Compare
facebook-github-bot
left a comment
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.
apaszke has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
@pytorchbot retest this please |
torch/csrc/autograd/profiler.cpp
Outdated
|
|
||
| void pushRange(std::string name, const char* msg/*= ""*/, int64_t sequence_nr/*= -1*/) { | ||
| const char* c_str(const char *str) { return str; } | ||
| const char* c_str(const std::string& str) { return str.c_str(); } |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
| std::string name_; | ||
| uint32_t thread_id_; | ||
| int64_t cpu_ns_; // signed to allow for negative intervals | ||
| std::unique_ptr<std::string> owned_name_; |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
ezyang
left a comment
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.
okey-dokey
facebook-github-bot
left a comment
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.
apaszke has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
facebook-github-bot
left a comment
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.
apaszke has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
To illustrate the benefits of this commit, I'll use the time/iter I got from one of the JIT benchmarks on my machine.
clock_gettimeinstead ofstd::chronoconst char*instead ofstd::string