-
Notifications
You must be signed in to change notification settings - Fork 505
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
Add profiler API for async capture #5969
Conversation
f6ad988
to
a7579ab
Compare
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.
Thanks a lot! Can we add a test to https://github.com/pytorch/xla/blob/master/test/test_profiler.py ? We already have a test for trace
so I imagine you can mostly just copy paste the test and make small modifications.
ac694c7
to
7297c4e
Compare
Thanks @JackCaoG - I generalized the test_profile_mp_mnist script to support programmatic captures and added a test case |
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.
Thanks!
* Add profiler API for async capture * Add unit test
* Add profiler API for async capture * Add unit test
* Add profiler API for async capture * Add unit test
To more easily support programmatic captures, this changes add a new API
trace_detached
totorch_xla.debug.profiler
to capture a profile from a background thread.Tested by using the new API in Llama2 training.