pytorch
1d6bd157 - [JIT] Add torch._C._jit submodule (#52910)

Commit
3 years ago
[JIT] Add torch._C._jit submodule (#52910) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/52910 **Summary** PR #52158 tried to move all JIT bindings from `torch._C` to a new submodule `torch._C._jit`, but that...did not go well. This pull request adds the new `torch._C._jit` submodule, but does not migrate the existing bindings. Instead, it adds a unit test that fails if any new bindings are added to `torch._C`. A comment in the test instructs developers to add their new binding to the allowlist if it really should be in `torch._C`, or to add it to the appropriate submodule (e.g `torch._C._jit`, for example). The idea is to prevent the issue described in #51691 from getting *worse* if it cannot be fixed. **Test Plan** Continuous integration. **Fixes** This commit fixes #51691. Test Plan: Imported from OSS Reviewed By: albanD Differential Revision: D26698373 Pulled By: SplitInfinity fbshipit-source-id: ec9f5426051227a513d4fd09512b624420e0100b
Author
Meghan Lele
Parents
Loading