[Profiler] add Preliminary queue depth computation#79874
[Profiler] add Preliminary queue depth computation#79874davidchencsl wants to merge 6 commits intogh/davidchencsl/3/basefrom
Conversation
[ghstack-poisoned]
🔗 Helpful links
✅ No Failures (0 Pending)As of commit 96aa3fb (more details on the Dr. CI page): Expand to see more💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Please report bugs/suggestions to the (internal) Dr. CI Users group. |
[ghstack-poisoned]
[ghstack-poisoned]
Test Plan: Add test to check the queue depth [ghstack-poisoned]
robieta
left a comment
There was a problem hiding this comment.
High level looks good. Just a couple of minor tweaks needed.
| time.sleep(0.1) | ||
| basic_evaluation = _utils.BasicEvaluation(prof.profiler) | ||
| for entry in basic_evaluation.compute_queue_depth(): | ||
| self.assertTrue(entry.queue_depth > 0) |
There was a problem hiding this comment.
Considering the fact that we force the second half to be overhead bound, why is queue_depth > 0?
| key=lambda x: x.start_us()) | ||
|
|
||
| kernel_mapping: Dict[_KinetoEvent, int] = {} | ||
| for cuda_launch_event in cuda_launch_events: |
There was a problem hiding this comment.
This is an N**2 algorithm, but it can be done in O(N)
There was a problem hiding this comment.
I've change it to keep track of the last mapped kernel index, and start searching from that since list is sorted.
Test Plan: Add test to check the queue depth [ghstack-poisoned]
|
Added commit to fix the nits. |
Test Plan: Add test to check the queue depth [ghstack-poisoned]
|
@pytorchmergebot merge -g |
|
@pytorchbot successfully started a merge job. Check the current status here |
|
@davidchencsl your PR has been successfully merged. |
|
Hey @davidchencsl. |
Summary: Pull Request resolved: #79874 Approved by: https://github.com/robieta Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/45e3afdef266b3776019f4e921ceff156e67a776 Reviewed By: atalman Differential Revision: D37327457 Pulled By: davidchencsl fbshipit-source-id: 2427ae32d87614e8a530e5b01d7cf593fe7e51e0
Pull Request resolved: pytorch#79874 Approved by: https://github.com/robieta
Pull Request resolved: pytorch#79874 Approved by: https://github.com/robieta
Stack from ghstack (oldest at bottom):
Test Plan:
Add test to check the queue depth