[user-events] Add inductor event types#165390
[user-events] Add inductor event types#165390mlazos wants to merge 10 commits intogh/mlazos/41/basefrom
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/165390
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New Failure, 2 Unrelated FailuresAs of commit c0ad8c3 with merge base 63776ec ( NEW FAILURE - The following job has failed:
FLAKY - The following job failed but was likely due to flakiness present on trunk:
UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as |
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy kadeng muchulee8 amjames chauhang aakhundov coconutruben jataylo chenyang78 [ghstack-poisoned]
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy kadeng muchulee8 amjames chauhang aakhundov coconutruben jataylo chenyang78 [ghstack-poisoned]
ghstack-source-id: a7a6c7d Pull Request resolved: pytorch/pytorch#165390
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy kadeng muchulee8 amjames chauhang aakhundov coconutruben jataylo chenyang78 [ghstack-poisoned]
This PR adds support for Symbolic events in the TorchInductor scheduler. In short, we create an EventFactory which provides event indices which monotonically increase as compile proceeds and enables reuse of events that are no longer used. It also adds codegen support for events. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy kadeng muchulee8 amjames chauhang aakhundov coconutruben jataylo chenyang78 [ghstack-poisoned]
eellison
left a comment
There was a problem hiding this comment.
a lil hard to review without tests but i understand we're breaking it up..
torch/_inductor/event.py
Outdated
| """Initialize a event factory.""" | ||
| self.symbolic_event_idx: itertools.count = itertools.count(start=1) | ||
| self.materialized_event_idx: itertools.count = itertools.count(start=1) | ||
| self.available_materialized_events: OrderedSet[str] = OrderedSet() |
There was a problem hiding this comment.
any reason to not just make these the actual event objects, and not strings ?
torch/_inductor/event.py
Outdated
| code.writeline(f"{event} = torch.cuda.Event()") | ||
| return event | ||
|
|
||
| def deposit_materialized_event(self, event: str) -> None: |
There was a problem hiding this comment.
Would it make sense to give event a different type than string, with a default repr?
This PR adds support for Symbolic events in the TorchInductor scheduler. In short, we create an EventFactory which provides event indices which monotonically increase as compile proceeds and enables reuse of events that are no longer used. It also adds codegen support for events. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy kadeng muchulee8 amjames chauhang aakhundov coconutruben jataylo chenyang78 [ghstack-poisoned]
This PR adds support for Symbolic events in the TorchInductor scheduler. In short, we create an EventFactory which provides event indices which monotonically increase as compile proceeds and enables reuse of events that are no longer used. It also adds codegen support for events. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy kadeng muchulee8 amjames chauhang aakhundov coconutruben jataylo chenyang78 [ghstack-poisoned]
This PR adds support for Symbolic events in the TorchInductor scheduler. In short, we create an EventFactory which provides event indices which monotonically increase as compile proceeds and enables reuse of events that are no longer used. It also adds codegen support for events. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy kadeng muchulee8 amjames chauhang aakhundov coconutruben jataylo chenyang78 [ghstack-poisoned]
This PR adds support for Symbolic events in the TorchInductor scheduler. In short, we create an EventFactory which provides event indices which monotonically increase as compile proceeds and enables reuse of events that are no longer used. It also adds codegen support for events. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy kadeng muchulee8 amjames chauhang aakhundov coconutruben jataylo chenyang78 [ghstack-poisoned]
|
Starting merge as part of PR stack under #165391 |
This PR adds support for Symbolic events in the TorchInductor scheduler. In short, we create an EventFactory which provides event indices which monotonically increase as compile proceeds and enables reuse of events that are no longer used. It also adds codegen support for events. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy kadeng muchulee8 amjames chauhang aakhundov coconutruben jataylo chenyang78 [ghstack-poisoned]
|
Starting merge as part of PR stack under #165391 |
2 similar comments
|
Starting merge as part of PR stack under #165391 |
|
Starting merge as part of PR stack under #165391 |
This PR adds utility functions for managing streams and a stream pool. Pull Request resolved: #165504 Approved by: https://github.com/eellison ghstack dependencies: #165390
This PR implements stream codegen to the SubgraphWrapper Codegen. It supports codegen for enter/exiting stream contexts and calling record_stream on returned tensors. Pull Request resolved: #165391 Approved by: https://github.com/eellison ghstack dependencies: #165390, #165504
This PR adds support for Symbolic events in the TorchInductor scheduler. In short, we create an EventFactory which provides event indices which monotonically increase as compile proceeds and enables reuse of events that are no longer used. It also adds codegen support for events. Pull Request resolved: pytorch#165390 Approved by: https://github.com/eellison
This PR adds utility functions for managing streams and a stream pool. Pull Request resolved: pytorch#165504 Approved by: https://github.com/eellison ghstack dependencies: pytorch#165390
…h#165391) This PR implements stream codegen to the SubgraphWrapper Codegen. It supports codegen for enter/exiting stream contexts and calling record_stream on returned tensors. Pull Request resolved: pytorch#165391 Approved by: https://github.com/eellison ghstack dependencies: pytorch#165390, pytorch#165504
ghstack-source-id: beed124 Pull Request resolved: pytorch/pytorch#165390
ghstack-source-id: 0790e88 Pull Request resolved: pytorch/pytorch#165390
This PR adds support for Symbolic events in the TorchInductor scheduler. In short, we create an EventFactory which provides event indices which monotonically increase as compile proceeds and enables reuse of events that are no longer used. It also adds codegen support for events.
Stack from ghstack (oldest at bottom):
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben @jataylo @chenyang78