pytorch/torch/csrc/jit/python
Andres Lugo-Reyes f1a1356907 [ROCm] Enable/fix unit tests test_stream_args and test_event_args (#82346)
### Description
Removed some stubbed out code that was necessary for ROCm builds to support JIT compilation of Event and Stream classes. Original motivation for the code to be stubbed out in the ROCm case was likely due to this pull request:
https://github.com/pytorch/pytorch/pull/48020
In this PR, the include statement at the at the top of cuda.h was incorrectly pointed to aten/src/ATen/cuda/CUDAEvent.h when it should have been set to ATen/cuda/CUDAEvent.h. This error caused the hipification process of build_amd.py to not hipify this include statement correctly, causing errors. The include statement in question was subsequently fixed in the following commit:
acd072967a

This PR re-introduces the stubbed out code to the ROCm build and "unskips" the associated unit tests.

### Testing
Note: bullets prepended by ROCm were tested on systems with AMD GPUs while the others were tested with NVIDIA GPUs.
- apply commit
- (ROCm)`python tools/amd_build/build_amd.py`
- `python setup.py develop`
- (ROCm)`PYTORCH_TEST_WITH_ROCM=1 python test/test_jit.py TestCUDA.test_event_args`
- (ROCm)`PYTORCH_TEST_WITH_ROCM=1 python test/test_jit.py TestCUDA.test_stream_args`
- `python test/test_jit.py TestCUDA.test_event_args`
- `python test/test_jit.py TestCUDA.test_stream_args`
- Confirm tests pass in all scenarios

Pull Request resolved: https://github.com/pytorch/pytorch/pull/82346
Approved by: https://github.com/malfet
2022-08-01 22:55:15 +00:00
..
init.cpp Change SymIntNode into an intrusive pointer (#82548) 2022-08-01 15:07:21 +00:00
init.h
module_python.h Revert "Add a lint rule for torch/csrc/util/pybind.h include (#82552)" 2022-08-01 20:25:35 +00:00
pybind_utils.cpp Rename SymbolicIntNode to SymIntNodeImpl (#82350) 2022-07-28 18:27:45 +00:00
pybind_utils.h Rename SymbolicIntNode to SymIntNodeImpl (#82350) 2022-07-28 18:27:45 +00:00
pybind.h
python_arg_flatten.cpp [ONNX] Support optional type (#68793) (#73284) 2022-05-04 20:24:30 +00:00
python_arg_flatten.h
python_custom_class.cpp
python_custom_class.h
python_dict.cpp Revert "Add a lint rule for torch/csrc/util/pybind.h include (#82552)" 2022-08-01 20:25:35 +00:00
python_dict.h
python_interpreter.cpp Revert "Add a lint rule for torch/csrc/util/pybind.h include (#82552)" 2022-08-01 20:25:35 +00:00
python_ir.cpp Revert "[JIT] Support scripting torch.is_autocast_enabled() (#81305)" 2022-07-28 00:02:53 +00:00
python_ir.h
python_ivalue.h Revert "Add a lint rule for torch/csrc/util/pybind.h include (#82552)" 2022-08-01 20:25:35 +00:00
python_list.cpp Revert "Add a lint rule for torch/csrc/util/pybind.h include (#82552)" 2022-08-01 20:25:35 +00:00
python_list.h Fix sign-compare violations in python_list.h 2022-04-01 19:15:51 +00:00
python_sugared_value.cpp [ROCm] Enable/fix unit tests test_stream_args and test_event_args (#82346) 2022-08-01 22:55:15 +00:00
python_sugared_value.h [ROCm] Enable/fix unit tests test_stream_args and test_event_args (#82346) 2022-08-01 22:55:15 +00:00
python_tracer.cpp Fix C API to be compatible with latest 3.11 beta (#81242) 2022-07-27 08:37:10 +00:00
python_tracer.h
python_tree_views.cpp Reland "Make debug_pkl smaller by only emitting unique traces." (#73368) 2022-04-18 22:34:21 +00:00
python_tree_views.h
script_init.cpp Revert "Add a lint rule for torch/csrc/util/pybind.h include (#82552)" 2022-08-01 20:25:35 +00:00
script_init.h
update_graph_executor_opt.cpp
update_graph_executor_opt.h