You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/10/17 00:33:16 UTC
[GitHub] [tvm] tkonolige opened a new pull request #9300: [Profiler] Sort columns in table and csv output
tkonolige opened a new pull request #9300:
URL: https://github.com/apache/tvm/pull/9300
This should fix some problems around flakey profiler tests based on order of columns. See #9275
@Lunderberg
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] masahi merged pull request #9300: [Profiler] Sort columns in table and csv output
Posted by GitBox <gi...@apache.org>.
masahi merged pull request #9300:
URL: https://github.com/apache/tvm/pull/9300
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] Lunderberg commented on a change in pull request #9300: [Profiler] Sort columns in table and csv output
Posted by GitBox <gi...@apache.org>.
Lunderberg commented on a change in pull request #9300:
URL: https://github.com/apache/tvm/pull/9300#discussion_r730117435
##########
File path: src/runtime/profiling.cc
##########
@@ -407,18 +407,19 @@ String ReportNode::AsTable(bool sort, bool aggregate) const {
}
// Table formatting
- std::unordered_set<std::string> unique_headers;
+ std::set<std::string> unique_headers;
for (auto row : aggregated_calls) {
for (auto p : row) {
unique_headers.insert(p.first);
}
}
- std::vector<std::string> headers = {"Name", "Duration (us)",
- "Percent"}; // always include these headers
+ // always include these headers in this order
+ std::vector<std::string> headers = {"Name", "Duration (us)", "Percent",
+ "Device", "Count", "Argument Shapes"};
for (auto header : unique_headers) {
- if (header != "Name" && header != "Duration (us)" && header != "Percent") {
+ if (std::find(headers.begin(), headers.end(), header) == headers.end()) {
Review comment:
Are we worried about this being quadratic in the number of unique headers, or will there always be a small number?
##########
File path: src/runtime/profiling.cc
##########
@@ -407,18 +407,19 @@ String ReportNode::AsTable(bool sort, bool aggregate) const {
}
// Table formatting
- std::unordered_set<std::string> unique_headers;
+ std::set<std::string> unique_headers;
for (auto row : aggregated_calls) {
for (auto p : row) {
unique_headers.insert(p.first);
}
}
- std::vector<std::string> headers = {"Name", "Duration (us)",
- "Percent"}; // always include these headers
+ // always include these headers in this order
+ std::vector<std::string> headers = {"Name", "Duration (us)", "Percent",
+ "Device", "Count", "Argument Shapes"};
for (auto header : unique_headers) {
- if (header != "Name" && header != "Duration (us)" && header != "Percent") {
+ if (std::find(headers.begin(), headers.end(), header) == headers.end()) {
Review comment:
Agreed, I just wasn't sure if there were other edge cases. In that case, looks good to me.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] tkonolige commented on a change in pull request #9300: [Profiler] Sort columns in table and csv output
Posted by GitBox <gi...@apache.org>.
tkonolige commented on a change in pull request #9300:
URL: https://github.com/apache/tvm/pull/9300#discussion_r730117945
##########
File path: src/runtime/profiling.cc
##########
@@ -407,18 +407,19 @@ String ReportNode::AsTable(bool sort, bool aggregate) const {
}
// Table formatting
- std::unordered_set<std::string> unique_headers;
+ std::set<std::string> unique_headers;
for (auto row : aggregated_calls) {
for (auto p : row) {
unique_headers.insert(p.first);
}
}
- std::vector<std::string> headers = {"Name", "Duration (us)",
- "Percent"}; // always include these headers
+ // always include these headers in this order
+ std::vector<std::string> headers = {"Name", "Duration (us)", "Percent",
+ "Device", "Count", "Argument Shapes"};
for (auto header : unique_headers) {
- if (header != "Name" && header != "Duration (us)" && header != "Percent") {
+ if (std::find(headers.begin(), headers.end(), header) == headers.end()) {
Review comment:
I would assume the number of headers is going to be small.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org