[Profiler] Make KinetoEvent a view of Result (Part 2, python and stacks)#81320
Closed
robieta wants to merge 16 commits intogh/robieta/81/basefrom
Closed
[Profiler] Make KinetoEvent a view of Result (Part 2, python and stacks)#81320robieta wants to merge 16 commits intogh/robieta/81/basefrom
robieta wants to merge 16 commits intogh/robieta/81/basefrom
Conversation
The semantics of python in KinetoEvent are sort of crazy because values can come either from metadata captured by JIT or from the python tracer. Things aren't helped by the fact that we encode the python hierarchy in the chrome trace for tensorboard, so we have to do a tree traversal with skips based on types. By simply constructing the Python stack in KinetoEvent's ctor we're able to skip a lot of the complexity in `EventFieldsVisitor` and just lean on `KinetoEvent.stack()`. Differential Revision: [D37481561](https://our.internmc.facebook.com/intern/diff/D37481561/) [ghstack-poisoned]
Contributor
🔗 Helpful links
❌ 1 New FailuresAs of commit 76c5d5a (more details on the Dr. CI page): Expand to see more
🕵️ 1 new failure recognized by patternsThe following CI failures do not appear to be due to upstream breakages
|
This was referenced Jul 12, 2022
…on and stacks)" The semantics of python in KinetoEvent are sort of crazy because values can come either from metadata captured by JIT or from the python tracer. Things aren't helped by the fact that we encode the python hierarchy in the chrome trace for tensorboard, so we have to do a tree traversal with skips based on types. By simply constructing the Python stack in KinetoEvent's ctor we're able to skip a lot of the complexity in `EventFieldsVisitor` and just lean on `KinetoEvent.stack()`. Differential Revision: [D37481561](https://our.internmc.facebook.com/intern/diff/D37481561/) [ghstack-poisoned]
This was referenced Jul 22, 2022
…on and stacks)" The semantics of python in KinetoEvent are sort of crazy because values can come either from metadata captured by JIT or from the python tracer. Things aren't helped by the fact that we encode the python hierarchy in the chrome trace for tensorboard, so we have to do a tree traversal with skips based on types. By simply constructing the Python stack in KinetoEvent's ctor we're able to skip a lot of the complexity in `EventFieldsVisitor` and just lean on `KinetoEvent.stack()`. Differential Revision: [D37481561](https://our.internmc.facebook.com/intern/diff/D37481561/) [ghstack-poisoned]
robieta
commented
Jul 29, 2022
| } | ||
|
|
||
| const c10::ArrayRef<std::string> KinetoEvent::stack() const { | ||
| auto get = [&](const auto& i) { |
Contributor
Author
There was a problem hiding this comment.
C++: Just use lambdas, they simplify everything.
Also C++: "This line is missing -> auto& so we made a copy and now ASAN is mad."
added 2 commits
July 29, 2022 17:23
…on and stacks)" The semantics of python in KinetoEvent are sort of crazy because values can come either from metadata captured by JIT or from the python tracer. Things aren't helped by the fact that we encode the python hierarchy in the chrome trace for tensorboard, so we have to do a tree traversal with skips based on types. By simply constructing the Python stack in KinetoEvent's ctor we're able to skip a lot of the complexity in `EventFieldsVisitor` and just lean on `KinetoEvent.stack()`. Differential Revision: [D37481561](https://our.internmc.facebook.com/intern/diff/D37481561/) [ghstack-poisoned]
…on and stacks)" The semantics of python in KinetoEvent are sort of crazy because values can come either from metadata captured by JIT or from the python tracer. Things aren't helped by the fact that we encode the python hierarchy in the chrome trace for tensorboard, so we have to do a tree traversal with skips based on types. By simply constructing the Python stack in KinetoEvent's ctor we're able to skip a lot of the complexity in `EventFieldsVisitor` and just lean on `KinetoEvent.stack()`. Differential Revision: [D37481561](https://our.internmc.facebook.com/intern/diff/D37481561/) [ghstack-poisoned]
robieta
pushed a commit
that referenced
this pull request
Jul 30, 2022
Pull Request resolved: #81320 The semantics of python in KinetoEvent are sort of crazy because values can come either from metadata captured by JIT or from the python tracer. Things aren't helped by the fact that we encode the python hierarchy in the chrome trace for tensorboard, so we have to do a tree traversal with skips based on types. By simply constructing the Python stack in KinetoEvent's ctor we're able to skip a lot of the complexity in `EventFieldsVisitor` and just lean on `KinetoEvent.stack()`. ghstack-source-id: 162969387 Differential Revision: [D37481561](https://our.internmc.facebook.com/intern/diff/D37481561/)
…on and stacks)" The semantics of python in KinetoEvent are sort of crazy because values can come either from metadata captured by JIT or from the python tracer. Things aren't helped by the fact that we encode the python hierarchy in the chrome trace for tensorboard, so we have to do a tree traversal with skips based on types. By simply constructing the Python stack in KinetoEvent's ctor we're able to skip a lot of the complexity in `EventFieldsVisitor` and just lean on `KinetoEvent.stack()`. Differential Revision: [D37481561](https://our.internmc.facebook.com/intern/diff/D37481561/) [ghstack-poisoned]
…on and stacks)" The semantics of python in KinetoEvent are sort of crazy because values can come either from metadata captured by JIT or from the python tracer. Things aren't helped by the fact that we encode the python hierarchy in the chrome trace for tensorboard, so we have to do a tree traversal with skips based on types. By simply constructing the Python stack in KinetoEvent's ctor we're able to skip a lot of the complexity in `EventFieldsVisitor` and just lean on `KinetoEvent.stack()`. Differential Revision: [D37481561](https://our.internmc.facebook.com/intern/diff/D37481561/) [ghstack-poisoned]
…on and stacks)" The semantics of python in KinetoEvent are sort of crazy because values can come either from metadata captured by JIT or from the python tracer. Things aren't helped by the fact that we encode the python hierarchy in the chrome trace for tensorboard, so we have to do a tree traversal with skips based on types. By simply constructing the Python stack in KinetoEvent's ctor we're able to skip a lot of the complexity in `EventFieldsVisitor` and just lean on `KinetoEvent.stack()`. Differential Revision: [D37481561](https://our.internmc.facebook.com/intern/diff/D37481561/) [ghstack-poisoned]
…on and stacks)" The semantics of python in KinetoEvent are sort of crazy because values can come either from metadata captured by JIT or from the python tracer. Things aren't helped by the fact that we encode the python hierarchy in the chrome trace for tensorboard, so we have to do a tree traversal with skips based on types. By simply constructing the Python stack in KinetoEvent's ctor we're able to skip a lot of the complexity in `EventFieldsVisitor` and just lean on `KinetoEvent.stack()`. Differential Revision: [D37481561](https://our.internmc.facebook.com/intern/diff/D37481561/) [ghstack-poisoned]
robieta
pushed a commit
that referenced
this pull request
Aug 1, 2022
Pull Request resolved: #81320 The semantics of python in KinetoEvent are sort of crazy because values can come either from metadata captured by JIT or from the python tracer. Things aren't helped by the fact that we encode the python hierarchy in the chrome trace for tensorboard, so we have to do a tree traversal with skips based on types. By simply constructing the Python stack in KinetoEvent's ctor we're able to skip a lot of the complexity in `EventFieldsVisitor` and just lean on `KinetoEvent.stack()`. ghstack-source-id: 163104855 Differential Revision: [D37481561](https://our.internmc.facebook.com/intern/diff/D37481561/)
…on and stacks)" The semantics of python in KinetoEvent are sort of crazy because values can come either from metadata captured by JIT or from the python tracer. Things aren't helped by the fact that we encode the python hierarchy in the chrome trace for tensorboard, so we have to do a tree traversal with skips based on types. By simply constructing the Python stack in KinetoEvent's ctor we're able to skip a lot of the complexity in `EventFieldsVisitor` and just lean on `KinetoEvent.stack()`. Differential Revision: [D37481561](https://our.internmc.facebook.com/intern/diff/D37481561/) [ghstack-poisoned]
added 2 commits
August 3, 2022 10:40
…on and stacks)" The semantics of python in KinetoEvent are sort of crazy because values can come either from metadata captured by JIT or from the python tracer. Things aren't helped by the fact that we encode the python hierarchy in the chrome trace for tensorboard, so we have to do a tree traversal with skips based on types. By simply constructing the Python stack in KinetoEvent's ctor we're able to skip a lot of the complexity in `EventFieldsVisitor` and just lean on `KinetoEvent.stack()`. Differential Revision: [D37481561](https://our.internmc.facebook.com/intern/diff/D37481561/) [ghstack-poisoned]
…on and stacks)" The semantics of python in KinetoEvent are sort of crazy because values can come either from metadata captured by JIT or from the python tracer. Things aren't helped by the fact that we encode the python hierarchy in the chrome trace for tensorboard, so we have to do a tree traversal with skips based on types. By simply constructing the Python stack in KinetoEvent's ctor we're able to skip a lot of the complexity in `EventFieldsVisitor` and just lean on `KinetoEvent.stack()`. Differential Revision: [D37481561](https://our.internmc.facebook.com/intern/diff/D37481561/) [ghstack-poisoned]
pbelevich
approved these changes
Aug 5, 2022
pytorchmergebot
pushed a commit
that referenced
this pull request
Aug 5, 2022
…ks) (#81320) The semantics of python in KinetoEvent are sort of crazy because values can come either from metadata captured by JIT or from the python tracer. Things aren't helped by the fact that we encode the python hierarchy in the chrome trace for tensorboard, so we have to do a tree traversal with skips based on types. By simply constructing the Python stack in KinetoEvent's ctor we're able to skip a lot of the complexity in `EventFieldsVisitor` and just lean on `KinetoEvent.stack()`. Differential Revision: [D37481561](https://our.internmc.facebook.com/intern/diff/D37481561/) Pull Request resolved: #81320 Approved by: https://github.com/pbelevich
added 2 commits
August 5, 2022 08:08
…on and stacks)" The semantics of python in KinetoEvent are sort of crazy because values can come either from metadata captured by JIT or from the python tracer. Things aren't helped by the fact that we encode the python hierarchy in the chrome trace for tensorboard, so we have to do a tree traversal with skips based on types. By simply constructing the Python stack in KinetoEvent's ctor we're able to skip a lot of the complexity in `EventFieldsVisitor` and just lean on `KinetoEvent.stack()`. Differential Revision: [D37481561](https://our.internmc.facebook.com/intern/diff/D37481561/) [ghstack-poisoned]
…on and stacks)" The semantics of python in KinetoEvent are sort of crazy because values can come either from metadata captured by JIT or from the python tracer. Things aren't helped by the fact that we encode the python hierarchy in the chrome trace for tensorboard, so we have to do a tree traversal with skips based on types. By simply constructing the Python stack in KinetoEvent's ctor we're able to skip a lot of the complexity in `EventFieldsVisitor` and just lean on `KinetoEvent.stack()`. Differential Revision: [D37481561](https://our.internmc.facebook.com/intern/diff/D37481561/) [ghstack-poisoned]
…on and stacks)" The semantics of python in KinetoEvent are sort of crazy because values can come either from metadata captured by JIT or from the python tracer. Things aren't helped by the fact that we encode the python hierarchy in the chrome trace for tensorboard, so we have to do a tree traversal with skips based on types. By simply constructing the Python stack in KinetoEvent's ctor we're able to skip a lot of the complexity in `EventFieldsVisitor` and just lean on `KinetoEvent.stack()`. Differential Revision: [D37481561](https://our.internmc.facebook.com/intern/diff/D37481561/) [ghstack-poisoned]
robieta
pushed a commit
that referenced
this pull request
Aug 6, 2022
Pull Request resolved: #81320 The semantics of python in KinetoEvent are sort of crazy because values can come either from metadata captured by JIT or from the python tracer. Things aren't helped by the fact that we encode the python hierarchy in the chrome trace for tensorboard, so we have to do a tree traversal with skips based on types. By simply constructing the Python stack in KinetoEvent's ctor we're able to skip a lot of the complexity in `EventFieldsVisitor` and just lean on `KinetoEvent.stack()`. ghstack-source-id: 163748936 Differential Revision: [D37481561](https://our.internmc.facebook.com/intern/diff/D37481561/)
…on and stacks)" The semantics of python in KinetoEvent are sort of crazy because values can come either from metadata captured by JIT or from the python tracer. Things aren't helped by the fact that we encode the python hierarchy in the chrome trace for tensorboard, so we have to do a tree traversal with skips based on types. By simply constructing the Python stack in KinetoEvent's ctor we're able to skip a lot of the complexity in `EventFieldsVisitor` and just lean on `KinetoEvent.stack()`. Differential Revision: [D37481561](https://our.internmc.facebook.com/intern/diff/D37481561/) [ghstack-poisoned]
This was referenced Aug 8, 2022
facebook-github-bot
pushed a commit
that referenced
this pull request
Aug 9, 2022
…ks) (#81320) (#81320) Summary: The semantics of python in KinetoEvent are sort of crazy because values can come either from metadata captured by JIT or from the python tracer. Things aren't helped by the fact that we encode the python hierarchy in the chrome trace for tensorboard, so we have to do a tree traversal with skips based on types. By simply constructing the Python stack in KinetoEvent's ctor we're able to skip a lot of the complexity in `EventFieldsVisitor` and just lean on `KinetoEvent.stack()`. Pull Request resolved: #81320 Approved by: https://github.com/pbelevich Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/7a726a4f2dcdaadc5d2863197cf0bbca569a564f Original Phabricator Test Plan: Existing unit tests Reviewed By: chaekit, seemethere, kit1980 Differential Revision: D37481561 Pulled By: robieta fbshipit-source-id: 1ac7bd183c076b1c59646571d89a90d25efae8ff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack from ghstack (oldest at bottom):
result_) #81321The semantics of python in KinetoEvent are sort of crazy because values can come either from metadata captured by JIT or from the python tracer. Things aren't helped by the fact that we encode the python hierarchy in the chrome trace for tensorboard, so we have to do a tree traversal with skips based on types.
By simply constructing the Python stack in KinetoEvent's ctor we're able to skip a lot of the complexity in
EventFieldsVisitorand just lean onKinetoEvent.stack().Differential Revision: D37481561