Previous access by stream 0 during kernel:
   aten::rand(int[] size, *, int? dtype=None, Device? device=None) -> Tensor
   writing to the output
   With stack trace:
     File "example_error.py", line 3, in 
       a = torch.rand(10000, device="cuda")
     ...
     File "pytorch/torch/cuda/_sanitizer.py", line 364, in _handle_kernel_launch
       stack_trace = traceback.StackSummary.extract(
Tensor was allocated with stack trace:
     File "example_error.py", line 3, in 
       a = torch.rand(10000, device="cuda")
     ...
     File "pytorch/torch/cuda/_sanitizer.py", line 420, in _handle_memory_allocation
       traceback.StackSummary.extract(
This gives extensive insight into the origin of the error:


A tensor was incorrectly accessed from streams with ids: 0 (default
  stream) and 94646435460352 (new stream)


The tensor was allocated by invoking "a = torch.rand(10000,
  device="cuda")"


The faulty accesses were caused by operators

