pytorch/c10/core/impl
Edward Yang dd64e738c5 Expunge TensorId from all DispatchKey names. (#36240)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/36240

It's annoying, historical, and unnecessary (enum class is already
namespaced).  I did this codemod with:

```
git grep -l 'CPUTensorId' | xargs sed -i 's/CPUTensorId/CPU/g'
git grep -l 'CUDATensorId' | xargs sed -i 's/CUDATensorId/CUDA/g'
git grep -l 'VariableTensorId' | xargs sed -i 's/VariableTensorId/Autograd/g'
git grep -l 'HIPTensorId' | xargs sed -i 's/HIPTensorId/HIP/g'
git grep -l 'MSNPUTensorId' | xargs sed -i 's/MSNPUTensorId/MSNPU/g'
git grep -l 'XLATensorId' | xargs sed -i 's/XLATensorId/XLA/g'
git grep -l 'PrivateUse1_TensorId' | xargs sed -i 's/PrivateUse1_TensorId/PrivateUse1/g'
git grep -l 'PrivateUse2_TensorId' | xargs sed -i 's/PrivateUse2_TensorId/PrivateUse2/g'
git grep -l 'PrivateUse3_TensorId' | xargs sed -i 's/PrivateUse3_TensorId/PrivateUse3/g'
git grep -l 'AutocastTensorId' | xargs sed -i 's/AutocastTensorId/Autocast/g'
git grep -l '_PreAutogradTensorId' | xargs sed -i 's/_PreAutogradTensorId/_PreAutograd/g'
git grep -l 'TESTING_ONLY_GenericWrapperTensorId' | xargs sed -i 's/TESTING_ONLY_GenericWrapperTensorId/TESTING_ONLY_GenericWrapper/g'
git grep -l 'TESTING_ONLY_GenericModeTensorId' | xargs sed -i 's/TESTING_ONLY_GenericModeTensorId/TESTING_ONLY_GenericMode/g'
```

Then I did a git grep for remaining TensorId occurrences, and manually
killed those (mostly in codegen, and some docs that needed updating).

Signed-off-by: Edward Z. Yang <ezyang@fb.com>

Test Plan: Imported from OSS

Differential Revision: D20929255

Pulled By: ezyang

fbshipit-source-id: dc371b6aa6e6ea7c0a5660137c14debde806a09d
2020-04-13 23:33:44 -07:00
..
DeviceGuardImplInterface.cpp Move files to/from c10/core and c10/util (#15316) 2019-01-10 16:22:22 -08:00
DeviceGuardImplInterface.h Give a better error message when people accidentally use unsupported devices (#29409) 2019-11-11 08:10:53 -08:00
FakeGuardImpl.h Creates Torch-friendly Event class and adds Stream tracking to autograd (#25130) 2019-09-01 12:37:52 -07:00
InlineDeviceGuard.h Move files to/from c10/core and c10/util (#15316) 2019-01-10 16:22:22 -08:00
InlineEvent.h Canonicalize includes in c10, and add tests for it (#36299) 2020-04-10 12:07:52 -07:00
InlineStreamGuard.h Move files to/from c10/core and c10/util (#15316) 2019-01-10 16:22:22 -08:00
LocalDispatchKeySet.cpp Expunge TensorId from all DispatchKey names. (#36240) 2020-04-13 23:33:44 -07:00
LocalDispatchKeySet.h Expunge TensorId from all DispatchKey names. (#36240) 2020-04-13 23:33:44 -07:00
README.md Move files to/from c10/core and c10/util (#15316) 2019-01-10 16:22:22 -08:00
VirtualGuardImpl.h Updates autograd engine to respect streams set in forward (#8354) 2019-09-10 23:46:51 -07:00

c10/core/impl provides headers for functionality that is only needed in very specific use-cases (e.g., you are defining a new device type), which are generally only needed by C10 or PyTorch code. If you are an ordinary end-user, you should not use headers in this folder. We permanently give NO backwards-compatibility guarantees for implementations in this folder.

Compare with c10/util, which provides functionality that is not directly related to being a deep learning library (e.g., C++20 polyfills), but may still be generally useful and visible to users.

(We don't call this c10/detail, because the detail namespace convention is for header private details. However, c10::impl may be utilized from external headers; it simply indicates that the functionality is not for end users.)