[Profiler][Minor] Organize collection.h/.cpp#82992
Closed
robieta wants to merge 13 commits intogh/robieta/95/basefrom
Closed
[Profiler][Minor] Organize collection.h/.cpp#82992robieta wants to merge 13 commits intogh/robieta/95/basefrom
robieta wants to merge 13 commits intogh/robieta/95/basefrom
Conversation
Collection of Torch ops is quite complex compared to backend events / allocations / ooms. Python is also complex, however it is already factored into a standalone unit. This PR just shuffles the contents of collection.cpp to group the Torch op specific parts together, and does various cleanups to the code. Differential Revision: [D38426344](https://our.internmc.facebook.com/intern/diff/D38426344/) [ghstack-poisoned]
Contributor
🔗 Helpful links
❌ 1 New FailuresAs of commit 4b6a9c9 (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 Aug 8, 2022
added 2 commits
August 8, 2022 11:57
Collection of Torch ops is quite complex compared to backend events / allocations / ooms. Python is also complex, however it is already factored into a standalone unit. This PR just shuffles the contents of collection.cpp to group the Torch op specific parts together, and does various cleanups to the code. Differential Revision: [D38426344](https://our.internmc.facebook.com/intern/diff/D38426344/) [ghstack-poisoned]
Collection of Torch ops is quite complex compared to backend events / allocations / ooms. Python is also complex, however it is already factored into a standalone unit. This PR just shuffles the contents of collection.cpp to group the Torch op specific parts together, and does various cleanups to the code. Differential Revision: [D38426344](https://our.internmc.facebook.com/intern/diff/D38426344/) [ghstack-poisoned]
robieta
pushed a commit
that referenced
this pull request
Aug 8, 2022
Pull Request resolved: #82992 Collection of Torch ops is quite complex compared to backend events / allocations / ooms. Python is also complex, however it is already factored into a standalone unit. This PR just shuffles the contents of collection.cpp to group the Torch op specific parts together, and does various cleanups to the code. ghstack-source-id: 163840418 Differential Revision: [D38426344](https://our.internmc.facebook.com/intern/diff/D38426344/)
chaekit
approved these changes
Aug 8, 2022
pytorchmergebot
pushed a commit
that referenced
this pull request
Aug 8, 2022
Collection of Torch ops is quite complex compared to backend events / allocations / ooms. Python is also complex, however it is already factored into a standalone unit. This PR just shuffles the contents of collection.cpp to group the Torch op specific parts together, and does various cleanups to the code. Differential Revision: [D38426344](https://our.internmc.facebook.com/intern/diff/D38426344/) Pull Request resolved: #82992 Approved by: https://github.com/chaekit
added 4 commits
August 9, 2022 13:07
Collection of Torch ops is quite complex compared to backend events / allocations / ooms. Python is also complex, however it is already factored into a standalone unit. This PR just shuffles the contents of collection.cpp to group the Torch op specific parts together, and does various cleanups to the code. Differential Revision: [D38426344](https://our.internmc.facebook.com/intern/diff/D38426344/) [ghstack-poisoned]
Collection of Torch ops is quite complex compared to backend events / allocations / ooms. Python is also complex, however it is already factored into a standalone unit. This PR just shuffles the contents of collection.cpp to group the Torch op specific parts together, and does various cleanups to the code. Differential Revision: [D38426344](https://our.internmc.facebook.com/intern/diff/D38426344/) [ghstack-poisoned]
Collection of Torch ops is quite complex compared to backend events / allocations / ooms. Python is also complex, however it is already factored into a standalone unit. This PR just shuffles the contents of collection.cpp to group the Torch op specific parts together, and does various cleanups to the code. Differential Revision: [D38426344](https://our.internmc.facebook.com/intern/diff/D38426344/) [ghstack-poisoned]
Collection of Torch ops is quite complex compared to backend events / allocations / ooms. Python is also complex, however it is already factored into a standalone unit. This PR just shuffles the contents of collection.cpp to group the Torch op specific parts together, and does various cleanups to the code. Differential Revision: [D38426344](https://our.internmc.facebook.com/intern/diff/D38426344/) [ghstack-poisoned]
This was referenced Aug 17, 2022
added 6 commits
August 17, 2022 12:55
Collection of Torch ops is quite complex compared to backend events / allocations / ooms. Python is also complex, however it is already factored into a standalone unit. This PR just shuffles the contents of collection.cpp to group the Torch op specific parts together, and does various cleanups to the code. Differential Revision: [D38426344](https://our.internmc.facebook.com/intern/diff/D38426344/) [ghstack-poisoned]
Collection of Torch ops is quite complex compared to backend events / allocations / ooms. Python is also complex, however it is already factored into a standalone unit. This PR just shuffles the contents of collection.cpp to group the Torch op specific parts together, and does various cleanups to the code. Differential Revision: [D38426344](https://our.internmc.facebook.com/intern/diff/D38426344/) [ghstack-poisoned]
Collection of Torch ops is quite complex compared to backend events / allocations / ooms. Python is also complex, however it is already factored into a standalone unit. This PR just shuffles the contents of collection.cpp to group the Torch op specific parts together, and does various cleanups to the code. Differential Revision: [D38426344](https://our.internmc.facebook.com/intern/diff/D38426344/) [ghstack-poisoned]
Collection of Torch ops is quite complex compared to backend events / allocations / ooms. Python is also complex, however it is already factored into a standalone unit. This PR just shuffles the contents of collection.cpp to group the Torch op specific parts together, and does various cleanups to the code. Differential Revision: [D38426344](https://our.internmc.facebook.com/intern/diff/D38426344/) [ghstack-poisoned]
Collection of Torch ops is quite complex compared to backend events / allocations / ooms. Python is also complex, however it is already factored into a standalone unit. This PR just shuffles the contents of collection.cpp to group the Torch op specific parts together, and does various cleanups to the code. Differential Revision: [D38426344](https://our.internmc.facebook.com/intern/diff/D38426344/) [ghstack-poisoned]
Collection of Torch ops is quite complex compared to backend events / allocations / ooms. Python is also complex, however it is already factored into a standalone unit. This PR just shuffles the contents of collection.cpp to group the Torch op specific parts together, and does various cleanups to the code. Differential Revision: [D38426344](https://our.internmc.facebook.com/intern/diff/D38426344/) [ghstack-poisoned]
facebook-github-bot
pushed a commit
that referenced
this pull request
Aug 23, 2022
Summary: Collection of Torch ops is quite complex compared to backend events / allocations / ooms. Python is also complex, however it is already factored into a standalone unit. This PR just shuffles the contents of collection.cpp to group the Torch op specific parts together, and does various cleanups to the code. Pull Request resolved: #82992 Approved by: https://github.com/chaekit Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/294f9d12826d63df1a736ffd4ef9dab2af2d10d0 Original Phabricator Test Plan: $ PROFILER_SOFT_ASSERT_RAISES=1 TORCH_SHOW_CPP_STACKTRACES=1 buck run mode/opt //caffe2/test:profiler Reviewed By: chaekit, seemethere Differential Revision: D38426344 Pulled By: robieta fbshipit-source-id: ae7e4ffed0570fb7d02dd9cc822732a552d51e35
zejun-chen
reviewed
Aug 14, 2024
| event->allow_tf32_cublas_}; | ||
|
|
||
| out.emplace_back(Result::create( | ||
| time_converter(event->start_time_), tid, kineto_info, std::move(e))); |
Contributor
There was a problem hiding this comment.
Hi, @robieta
Here i find the time_converter is always modifying the start time value for the each event of torch ops.
If the torch op's time stamp is getting from __rdtsc() intrinsic, the converter is needed to convert the time stamp value to time value, but if the time stamp is getting from the getTime(), why do the converter is needed here?
inline auto getApproximateTime() {
#if defined(C10_RDTSC)
return static_cast<uint64_t>(__rdtsc());
#else
return getTime();
#endif
}
Thank you.
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):
Collection of Torch ops is quite complex compared to backend events / allocations / ooms. Python is also complex, however it is already factored into a standalone unit. This PR just shuffles the contents of collection.cpp to group the Torch op specific parts together, and does various cleanups to the code.
Differential Revision: D38426344