mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Cannibalize noarch CI job into crossref CI job
crossref is a new strategy for performing tests when you want to run a normal PyTorch API call, separately run some variation of the API call (e.g., same thing but all the arguments are meta tensors) and then cross-reference the results to see that they are consistent. Any logic you add to CrossRefMode will get run on *every* PyTorch API call that is called in the course of PyTorch's test suite. This can be a good choice for correctness testing if OpInfo testing is not exhaustive enough. For now, the crossref test doesn't do anything except verify that we can validly push a mode onto the torch function mode stack for all functions. Signed-off-by: Edward Z. Yang <ezyangfb.com> Pull Request resolved: https://github.com/pytorch/pytorch/pull/75988 Approved by: https://github.com/seemethere
This commit is contained in:
committed by
PyTorch MergeBot
parent
d9219d2944
commit
ee955b8bb9
@ -42,7 +42,7 @@ except ImportError:
|
||||
skipIfNoMatplotlib = unittest.skipIf(not TEST_MATPLOTLIB, "no matplotlib")
|
||||
|
||||
import torch
|
||||
from torch.testing._internal.common_utils import TestCase, run_tests, TEST_WITH_ASAN
|
||||
from torch.testing._internal.common_utils import TestCase, run_tests, TEST_WITH_ASAN, TEST_WITH_CROSSREF
|
||||
|
||||
def tensor_N(shape, dtype=float):
|
||||
numel = np.prod(shape)
|
||||
@ -54,6 +54,8 @@ class BaseTestCase(TestCase):
|
||||
def setUp(self):
|
||||
if not TEST_TENSORBOARD:
|
||||
return self.skipTest("Skip the test since TensorBoard is not installed")
|
||||
if TEST_WITH_CROSSREF:
|
||||
return self.skipTest("Don't run TensorBoard tests with crossref")
|
||||
self.temp_dirs = []
|
||||
|
||||
def createSummaryWriter(self):
|
||||
|
||||
Reference in New Issue
Block a user