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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]