Zha0q1 commented on a change in pull request #15132: Profiler API Enhancements
URL: https://github.com/apache/incubator-mxnet/pull/15132#discussion_r293607476
##########
File path: src/c_api/c_api_profile.cc
##########
@@ -314,8 +323,15 @@ int MXAggregateProfileStatsPrint(const char **out_str,
int reset) {
std::shared_ptr<profiler::AggregateStats> stats =
profiler->GetAggregateStats();
std::ostringstream os;
if (stats) {
- stats->Dump(os, reset != 0);
+ if (static_cast<PrintFormat>(format) == PrintFormat::table)
+ stats->DumpTable(os, sort_by, ascending);
+ else if (static_cast<PrintFormat>(format) == PrintFormat::json)
+ stats->DumpJson(os, sort_by, ascending);
+ else
+ LOG(FATAL) << "Invliad value for parameter format";
Review comment:
This is in backend so format and sort_by are int. I will add the warning you
described to frontend
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services