anirudh2290 commented on issue #9681: Better Exception Handling for Operators
URL: https://github.com/apache/incubator-mxnet/pull/9681#issuecomment-363241899
 
 
   @piiswrong Trying to understand your comment. 
   
    Lets say we have some code snippet like the below:
   
   ```
   try:
          x, y, z = op()
          x.asnumpy()
   except:
          handle_exc()
   y = op2(y)
   y.asnumpy()       
   ```
   
   If we clear the exception_ptr corresponding to the var y when x.asnumpy() is 
executed, y may have some garbage value in it. op2 may end up executing fine, 
and after the last line  `y.asnumpy()` we have no exception thrown. Shouldn't 
all the vars and ops which are in the chain following a failed op also fail ? 
Not doing this, will lead to the vars in the dependency chain following a 
failed op having non-deterministic garbage values depending on how the failed 
op and the following ops behave.

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