[jit] kill script namespace (#34515)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/34515

Once upon a time we thought this was necessary. In reality it is not, so
removing it.

For backcompat, our public interface (defined in `api/`) still has
typedefs to the old `script::` names.

There was only one collision: `Pass` as a `Stmt` and `Pass` as a graph
transform. I renamed one of them.

Test Plan: Imported from OSS

Differential Revision: D20353503

Pulled By: suo

fbshipit-source-id: 48bb911ce75120a8c9e0c6fb65262ef775dfba93
This commit is contained in:
Michael Suo
2020-03-11 23:29:34 -07:00
committed by Facebook GitHub Bot
parent cf8b728255
commit c235be42dd
152 changed files with 559 additions and 694 deletions

View File

@ -53,7 +53,7 @@ TypePtr tryInferTypeWithTypeHint(
const py::object& type_hint) {
// If the py::object to be contained by the RRef is a ScripModule, we enforce
// users to specify its ModuleInterface type.
if (auto module = jit::script::as_module(value)) {
if (auto module = jit::as_module(value)) {
TORCH_CHECK(
!type_hint.is_none(),
"The RRef being created contains a ScriptModule, "