1import torch 2 3 4def foo(x: torch.Tensor) -> None: 5 stream = torch.cuda.current_stream() 6 x.record_stream(stream) 7