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

 ##########
 File path: src/imperative/imperative_utils.h
 ##########
 @@ -138,15 +138,23 @@ inline void SetShapeType(const Context& ctx,
   for (auto& i : outputs) {
     out_storage_types.push_back(i->storage_type());
   }
+  bool infer_stype_success;
   if (inferstorage.count(attrs.op)) {
-    CHECK(inferstorage[attrs.op](attrs, ctx.dev_mask(), dispatch_mode,
-                                 &in_storage_types, &out_storage_types));
+    infer_stype_success = inferstorage[attrs.op](attrs, ctx.dev_mask(), 
dispatch_mode,
+                                                 &in_storage_types, 
&out_storage_types);
   } else {
     // if infer storage attr is not present, apply the default infer storage 
function
-    bool success = exec::DefaultStorageType(attrs, ctx.dev_mask(), 
dispatch_mode,
-                                            &in_storage_types, 
&out_storage_types);
-    CHECK(success);
+    infer_stype_success = exec::DefaultStorageType(attrs, ctx.dev_mask(), 
dispatch_mode,
+                                                   &in_storage_types, 
&out_storage_types);
   }
+  if (!infer_stype_success) {
 
 Review comment:
   nit: Use CHECK to get rid of the `if` check.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to