mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Adds python ref consistency test, elementwise unary reference inputs, and formats test files
Per title. Pull Request resolved: https://github.com/pytorch/pytorch/pull/76626 Approved by: https://github.com/ngimel
This commit is contained in:
committed by
PyTorch MergeBot
parent
33be4c94c0
commit
f6bbecf8b5
@ -11,7 +11,7 @@ import random
|
||||
from torch.testing import make_tensor
|
||||
from torch.testing._internal.common_utils import (
|
||||
TestCase, run_tests, suppress_warnings, gradcheck, gradgradcheck,
|
||||
torch_to_numpy_dtype_dict,
|
||||
numpy_to_torch_dtype_dict,
|
||||
)
|
||||
from torch.testing._internal.common_device_type import \
|
||||
(instantiate_device_type_tests, onlyCPU, dtypes, onlyNativeDeviceTypes, skipMeta)
|
||||
@ -130,7 +130,7 @@ class TestViewOps(TestCase):
|
||||
@onlyNativeDeviceTypes
|
||||
@dtypes(*all_types_and_complex_and(torch.half, torch.bool))
|
||||
def test_view_dtype_new(self, device, dtype):
|
||||
dtypes = torch_to_numpy_dtype_dict.copy()
|
||||
dtypes = {value : key for (key, value) in numpy_to_torch_dtype_dict.items()}
|
||||
del dtypes[torch.bool]
|
||||
|
||||
def generate_inputs():
|
||||
|
Reference in New Issue
Block a user