summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorllyfacebook <34827865+llyfacebook@users.noreply.github.com>2018-06-13 18:05:05 -0700
committerSoumith Chintala <soumith@gmail.com>2018-06-13 21:05:05 -0400
commit681964cc47f3f55b422af701719f3405798bad12 (patch)
tree237363966e410efdb14c5b95392797b67dcfbf11 /modules
parentad378dfbafb8817b19009de080a118ebba3060d1 (diff)
downloadpytorch-681964cc47f3f55b422af701719f3405798bad12.tar.gz
pytorch-681964cc47f3f55b422af701719f3405798bad12.tar.bz2
pytorch-681964cc47f3f55b422af701719f3405798bad12.zip
output each operator separately due to logcat truncation (#8456)
as title
Diffstat (limited to 'modules')
-rw-r--r--modules/observers/net_observer_reporter_print.cc13
1 files changed, 4 insertions, 9 deletions
diff --git a/modules/observers/net_observer_reporter_print.cc b/modules/observers/net_observer_reporter_print.cc
index 28327a162b..0982e3d7ff 100644
--- a/modules/observers/net_observer_reporter_print.cc
+++ b/modules/observers/net_observer_reporter_print.cc
@@ -40,9 +40,9 @@ void NetObserverReporterPrint::report(
}
}
- std::stringstream buffer;
- buffer << IDENTIFIER << "{";
for (auto it = caffe2_perf.begin(); it != caffe2_perf.end(); it++) {
+ std::stringstream buffer;
+ buffer << IDENTIFIER << "{";
buffer << "\"" << it->first << "\""
<< ": {";
for (auto jt = it->second.begin(); jt != it->second.end(); jt++) {
@@ -63,13 +63,8 @@ void NetObserverReporterPrint::report(
buffer << ", ";
}
}
- buffer << "}";
- auto lt = it;
- if ((++lt) != caffe2_perf.end()) {
- buffer << ", ";
- }
+ buffer << "}}";
+ LOG(INFO) << buffer.str();
}
- buffer << "}";
- LOG(INFO) << buffer.str();
}
}