[PROFILING] Add ability to profile a single function_profiling#9553
Merged
masahi merged 3 commits intoapache:mainfrom Jan 9, 2022
Merged
[PROFILING] Add ability to profile a single function_profiling#9553masahi merged 3 commits intoapache:mainfrom
masahi merged 3 commits intoapache:mainfrom
Conversation
Add a new function `tvm.runtime.profiling.profile_function` which collects performance metrics for a single function in an IRModule. For example, collecting performance counters using `PAPIMetricCollector`. This is helpful for optimizing kernels and schedules for a single operator.
6f217ec to
327fcaa
Compare
areusch
reviewed
Nov 29, 2021
Contributor
areusch
left a comment
There was a problem hiding this comment.
couple questions @tkonolige
src/runtime/profiling.cc
Outdated
| Device dev{static_cast<DLDeviceType>(device_type), device_id}; | ||
|
|
||
| // warmup | ||
| for (size_t i = 0; i < 10; i++) { |
Contributor
There was a problem hiding this comment.
seems like this one should be configurable?
src/runtime/profiling.cc
Outdated
| std::unordered_map<String, ObjectRef> results; | ||
| for (size_t i = 0; i < collectors.size(); i++) { | ||
| auto r = collectors[i]->Stop(collector_data[i]); | ||
| // We might want to do this in a separate loop to avoid unnecessary time |
Contributor
There was a problem hiding this comment.
should we just do that now? seems better...
Contributor
Author
|
@areusch Could you re-review? |
Contributor
Author
|
@areusch gentle ping |
masahi
approved these changes
Jan 9, 2022
Raghav-Chakravarthy
pushed a commit
to Raghav-Chakravarthy/tvm
that referenced
this pull request
Jan 28, 2022
…e#9553) * [PROFILING] Add ability to profile a single function_profiling Add a new function `tvm.runtime.profiling.profile_function` which collects performance metrics for a single function in an IRModule. For example, collecting performance counters using `PAPIMetricCollector`. This is helpful for optimizing kernels and schedules for a single operator. * fix docs * configurable number of warmup iterations. avoid allocating when stopping collectors
ylc
pushed a commit
to ylc/tvm
that referenced
this pull request
Feb 16, 2022
…e#9553) * [PROFILING] Add ability to profile a single function_profiling Add a new function `tvm.runtime.profiling.profile_function` which collects performance metrics for a single function in an IRModule. For example, collecting performance counters using `PAPIMetricCollector`. This is helpful for optimizing kernels and schedules for a single operator. * fix docs * configurable number of warmup iterations. avoid allocating when stopping collectors
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.
Add a new function
tvm.runtime.profiling.profile_functionwhich collects performance metrics for a single function in an IRModule. For example, collecting performance counters usingPAPIMetricCollector. This is helpful for optimizing kernels and schedules for a single operator.