pytorch/torch/cuda
Aaron Gokaslan c5fafe9f48 [BE]: TRY002 - Ban raising vanilla exceptions (#124570)
Adds a ruff lint rule to ban raising raw exceptions. Most of these should at the very least be runtime exception, value errors, type errors or some other errors. There are hundreds of instance of these bad exception types already in the codebase, so I have noqa'd most of them. Hopefully this error code will get commiters to rethink what exception type they should raise when they submit a PR.

I also encourage people to gradually go and fix all the existing noqas that have been added so they can be removed overtime and our exception typing can be improved.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/124570
Approved by: https://github.com/ezyang
2024-04-21 22:26:40 +00:00
..
amp add GradScaler on CPU (#109993) 2024-01-29 23:42:35 +00:00
__init__.py Support Accelerator OOM Error (#121200) (#121702) 2024-04-15 21:41:46 +00:00
_gpu_trace.py Refactor gpu trace to be device-agnostic (#121794) 2024-03-30 13:04:38 +00:00
_memory_viz.py [BE] enable ruff rule RSE and remove useless parentheses in raise statements (#124261) 2024-04-17 19:29:34 +00:00
_sanitizer.py Refactor gpu trace to be device-agnostic (#121794) 2024-03-30 13:04:38 +00:00
_utils.py refactor code to share across different devices (#120602) 2024-02-28 09:42:58 +00:00
comm.py
error.py
graphs.py [CUDA graphs] Pool argument for make_graphed_callables (#121475) 2024-03-09 00:15:38 +00:00
jiterator.py [BE]: TRY002 - Ban raising vanilla exceptions (#124570) 2024-04-21 22:26:40 +00:00
memory.py [BE]: Update ruff to 0.4.1 (#124549) 2024-04-21 14:06:23 +00:00
nccl.py
nvtx.py
profiler.py
random.py
sparse.py
streams.py refactor code to share across different devices (#120602) 2024-02-28 09:42:58 +00:00