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:16:53 UTC

[GitHub] eric-haibin-lin commented on a change in pull request #9464: refactor logging in infer storage pass

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

 ##########
 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:
   Yeah I can use a multi-line string instead of all the ``<<``

----------------------------------------------------------------
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