piiswrong commented on a change in pull request #9681: Better Exception 
Handling for Operators
URL: https://github.com/apache/incubator-mxnet/pull/9681#discussion_r165727071
 
 

 ##########
 File path: src/engine/threaded_engine.cc
 ##########
 @@ -403,7 +417,11 @@ inline void ThreadedEngine::OnComplete(ThreadedOpr* 
threaded_opr) {
   }
   // Mark complete for write variables.
   for (auto&& i : threaded_opr->mutable_vars) {
-    const bool debug_info = (engine_info_ && debug_wait_var_ == i);
+    if (threaded_opr->ex_ptr) {
+      i->ex_ptr = threaded_opr->ex_ptr;
+      if (!global_ex_ptr) global_ex_ptr = i->ex_ptr;
+    }
 
 Review comment:
   suppose and operator has three outputs x, y and z and it raises an exception.
   then x.asnumpy() would raise an error.
   Then y.asnumpy() would raise the same error again.
   
   and if I do z += 1 and it succeeds, z.asnumpy() would still raise the error

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to