You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/01/17 06:11:40 UTC

[GitHub] cjolivier01 commented on a change in pull request #9464: refactor logging in infer storage pass

cjolivier01 commented on a change in pull request #9464: refactor logging in infer storage pass
URL: https://github.com/apache/incubator-mxnet/pull/9464#discussion_r161963534
 
 

 ##########
 File path: src/common/utils.h
 ##########
 @@ -374,6 +416,25 @@ inline void LogOnce(const std::string& message) {
   }
 }
 
+/*! \brief log storage fallback event
+ */
+inline void LogStorageFallback(const nnvm::NodeAttrs& attrs,
+                               const int dev_mask,
+                               const std::vector<int>* in_attrs,
+                               const std::vector<int>* out_attrs) {
+  static bool log = dmlc::GetEnv("MXNET_STORAGE_FALLBACK_LOG_VERBOSE", true);
+  if (!log) return;
+  const std::string op_str = operator_stype_string(attrs, dev_mask, *in_attrs, *out_attrs);
+  std::ostringstream os;
+  os << "\nStorage type fallback detected:\n" << op_str
 
 Review comment:
   This might get called a lot, right? If so, do you need all.of the << calls or can the string be continued without it?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services