Merge CUDA Streams and Events (#53902)
Summary:
-----------
- Updates current_stream and default stream API's to take `optional[device]` argument
- Adds parsing logic to replace `torch.cuda.Stream` and `torch.cuda.Event` -> `torch.classes.cuda.Stream` and `torch.classes.cuda.Event` for JIT
- Merges StreamContext manager for both Eager and JIT.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/53902
Test Plan:
------
Run JIT tests:
python test/test_jit.py -v TestCUDA
Run eager tests:
python test/test_cuda.py -v TestCuda
Reviewed By: glaringlee
Differential Revision: D27494627
Pulled By: nikithamalgifb
fbshipit-source-id: b30b0570e38a33fb335c83762eb06ffd46a44b5c