Revert "Remove remaining global set_default_dtype calls from tests (#107246)"

This reverts commit aa8ea1d787a9d21b064b664c5344376265feea6c.

Reverted https://github.com/pytorch/pytorch/pull/107246 on behalf of https://github.com/facebook-github-bot due to Diff reverted internally ([comment](https://github.com/pytorch/pytorch/pull/107246#issuecomment-1693838522))
This commit is contained in:
PyTorch MergeBot
2023-08-25 19:34:55 +00:00
parent c68d0a7042
commit 161ea463e6
17 changed files with 873 additions and 899 deletions

View File

@ -10,6 +10,9 @@ from torch.testing._internal.custom_op_db import custom_op_db
from torch.testing._internal.common_device_type import \
(instantiate_device_type_tests, ops, OpDTypes)
# TODO: fixme https://github.com/pytorch/pytorch/issues/68972
torch.set_default_dtype(torch.float32)
# gradcheck requires double precision
_gradcheck_ops = partial(ops, dtypes=OpDTypes.supported,
allowed_dtypes=[torch.double, torch.cdouble])