Solved by ptrblck in post #6 
              
              
                No, the error message would give you the failing operation. 
However, the stack trace might point to the wrong line of code, due to the asynchronous behavior. 
You could rerun the code with: 
CUDA_LAUNCH_BLOCKING=1 python script.py args

to get the proper stack trace with the offending operation.