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: SplitInfinity
Differential Revision: D27285996
Pulled By: nikithamalgifb
fbshipit-source-id: 45d9fee9a582b5f4c82330f5f99eb88584804270