Remove obsolete HAS_PRIMS_REFS (#99252)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/99252
Approved by: https://github.com/ngimel
This commit is contained in:
Jason Ansel 2023-04-16 12:38:55 -07:00 committed by PyTorch MergeBot
parent 20a1788136
commit 9ab5fdff81

View File

@ -33,23 +33,6 @@ import torch
import torch._export.constraints as _export_constraints import torch._export.constraints as _export_constraints
import torch._inductor.test_operators import torch._inductor.test_operators
try:
import torch._prims
# isort: split
# TODO: Hack to unblock simultaneous landing changes. Fix after https://github.com/pytorch/pytorch/pull/81088 lands
import torch._prims.utils
import torch._prims.wrappers
import torch._refs
import torch._refs.nn
import torch._refs.nn.functional
import torch._refs.special
HAS_PRIMS_REFS = True
except ImportError:
HAS_PRIMS_REFS = False
from . import comptime, config, external_utils from . import comptime, config, external_utils
""" """
@ -139,16 +122,6 @@ FILENAME_ALLOWLIST |= {
FILENAME_ALLOWLIST |= {torch.optim._functional.__file__} FILENAME_ALLOWLIST |= {torch.optim._functional.__file__}
FILENAME_ALLOWLIST |= {_export_constraints.__file__} FILENAME_ALLOWLIST |= {_export_constraints.__file__}
if HAS_PRIMS_REFS:
FILENAME_ALLOWLIST |= {
torch._prims.__file__,
torch._prims.utils.__file__,
torch._prims.wrappers.__file__,
torch._refs.__file__,
torch._refs.special.__file__,
torch._refs.nn.functional.__file__,
}
SKIP_DIRS_RE = None SKIP_DIRS_RE = None