mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
[jit] move script-related implementation out of torch/jit/__init__.py (#40902)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/40902 See the bottom of this stack for context. Test Plan: Imported from OSS Reviewed By: eellison Differential Revision: D22360210 Pulled By: suo fbshipit-source-id: 4275127173a36982ce9ad357aa344435b98e1faf
This commit is contained in:
committed by
Facebook GitHub Bot
parent
6c9b869930
commit
c93e96fbd9
@ -61,7 +61,7 @@ TypePtr tryInferTypeWithTypeHint(
|
||||
"The RRef being created contains a ScriptModule, "
|
||||
"must provide its ModuleInterface type hint. ");
|
||||
c10::QualifiedName type_qualified_name = c10::QualifiedName(
|
||||
py::cast<std::string>(py::module::import("torch.jit")
|
||||
py::cast<std::string>(py::module::import("torch._jit_internal")
|
||||
.attr("_qualified_name")(type_hint)));
|
||||
TypePtr type_hint_ptr =
|
||||
jit::get_python_cu()->get_interface(type_qualified_name);
|
||||
|
Reference in New Issue
Block a user