

The faulty accesses were caused by operators


"a = torch.rand(10000, device="cuda")" on stream 0


"torch.mul(a, 5, out=a)" on stream 94646435460352




The error message also displays the schemas of the invoked
  operators, along with a note showing which arguments of the
  operators correspond to the affected tensor.


In the example, it can be seen that tensor "a" corresponds to
    arguments "self", "out" and the "output" value of the invoked
    operator "torch.mul".


See also:
The list of supported torch operators and their schemas can be
  viewed here.
The bug can be fixed by forcing the new stream to wait for the default
stream:
with torch.cuda.stream(torch.cuda.Stream()):
       torch.cuda.current_stream().wait_stream(torch.cuda.default_stream())
       torch.mul(a, 5, out=a)
When the script is run again, there are no errors reported.
API Reference
torch.cuda._sanitizer.enable_cuda_sanitizer()
Enables CUDA Sanitizer.