mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
fix submodule imports by importing functions directly (#79368)
Summary: fixes two sporadic issues from missing attributes: - breaking circular imports - submodule not being imported explicitly Test Plan: sandcastle Reviewed By: ehhuang Differential Revision: D37071652 Pull Request resolved: https://github.com/pytorch/pytorch/pull/79368 Approved by: https://github.com/ananthsub
This commit is contained in:
parent
7751ed41a6
commit
ba4f780fde
1 changed files with 2 additions and 2 deletions
|
|
@ -6,7 +6,7 @@ import sys
|
|||
import types
|
||||
|
||||
import torch.jit
|
||||
import torch._utils_internal as torch_utils_internal
|
||||
from torch import _utils_internal
|
||||
|
||||
# Query `hasattr` only once.
|
||||
_SET_GLOBAL_FLAGS = hasattr(sys, 'getdlopenflags') and hasattr(sys, 'setdlopenflags')
|
||||
|
|
@ -252,7 +252,7 @@ class _Ops(types.ModuleType):
|
|||
if sys.executable == "torch_deploy":
|
||||
return
|
||||
|
||||
path = torch_utils_internal.resolve_library_path(path)
|
||||
path = _utils_internal.resolve_library_path(path)
|
||||
with dl_open_guard():
|
||||
# Import the shared library into the process, thus running its
|
||||
# static (global) initialization code in order to register custom
|
||||
|
|
|
|||
Loading…
Reference in a new issue