mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[dynamo] Support ndarray.dtype attribute access (#124490)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/124490 Approved by: https://github.com/lezcano ghstack dependencies: #125717
This commit is contained in:
committed by
PyTorch MergeBot
parent
a9cc147fa1
commit
4adee71155
@ -121,9 +121,7 @@ class TestBinaryUfuncs(TestCase):
|
||||
def _helper_reference_numerics(
|
||||
expected, actual, msg, exact_dtype, equal_nan=True
|
||||
):
|
||||
if not torch.can_cast(
|
||||
numpy_to_torch_dtype_dict[expected.dtype.type], dtype
|
||||
):
|
||||
if not torch.can_cast(numpy_to_torch_dtype_dict[expected.dtype], dtype):
|
||||
exact_dtype = False
|
||||
|
||||
if dtype is torch.bfloat16 and expected.dtype == np.float32:
|
||||
|
Reference in New Issue
Block a user