mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[BE] Migrate dtype_abbrs into one location (#152229)
Namely `torch.utils._dtype_abbrs.dtype_abbrs` Before that it was defined in various forms of completeness inc02edba863/torch/fx/graph.py (L215)
,c02edba863/torch/testing/_internal/common_utils.py (L5226)
andc02edba863/torch/testing/_internal/logging_tensor.py (L17)
TODO: - Add linter that `torch.testing._internal` module is not referenced from any of the public facing APIs, as it can have extra dependencies such as `expect_test` Fixes https://github.com/pytorch/pytorch/issues/152225 Pull Request resolved: https://github.com/pytorch/pytorch/pull/152229 Approved by: https://github.com/clee2000, https://github.com/Skylion007
This commit is contained in:
committed by
PyTorch MergeBot
parent
899eec665c
commit
13966d0bf5
@ -7,6 +7,7 @@ import os
|
||||
import numpy as np
|
||||
from enum import Enum
|
||||
from torch.overrides import resolve_name
|
||||
from torch.utils._dtype_abbrs import dtype_abbrs
|
||||
from torch.utils._pytree import tree_map, tree_map_only, tree_flatten, tree_unflatten
|
||||
from torch.utils import _pytree as pytree
|
||||
from torch._subclasses.meta_utils import MetaConverter, assert_metadata_eq, is_sparse_any
|
||||
@ -22,7 +23,6 @@ from torch.testing._internal.common_utils import (
|
||||
suppress_warnings,
|
||||
TEST_WITH_TORCHDYNAMO,
|
||||
run_tests,
|
||||
dtype_abbrs,
|
||||
parametrize,
|
||||
xfailIfTorchDynamo,
|
||||
)
|
||||
|
Reference in New Issue
Block a user