mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-15 21:00:47 +00:00
Skip tests that don't call gradcheck in slow gradcheck CI (#82117)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/82117 Approved by: https://github.com/kit1980, https://github.com/albanD
This commit is contained in:
parent
ce92c1cfe9
commit
0fcdf936e7
4 changed files with 11 additions and 4 deletions
|
|
@ -21,7 +21,7 @@ from hypothesis import strategies as st
|
|||
import torch.testing._internal.hypothesis_utils as hu
|
||||
hu.assert_deadline_disabled()
|
||||
|
||||
from torch.testing._internal.common_utils import TestCase
|
||||
from torch.testing._internal.common_utils import TestCase, skipIfSlowGradcheckEnv
|
||||
from torch.testing._internal.common_utils import IS_PPC, TEST_WITH_UBSAN, IS_MACOS, BUILD_WITH_CAFFE2
|
||||
from torch.testing._internal.common_quantization import skipIfNoFBGEMM, skipIfNoQNNPACK
|
||||
from torch.testing._internal.common_quantized import _quantize, _dequantize, _calculate_dynamic_qparams, \
|
||||
|
|
@ -130,6 +130,7 @@ def _get_random_tensor_and_q_params(shapes, rand_scale, torch_type):
|
|||
X_scale = 1e-10
|
||||
return X, X_scale, X_zero_point
|
||||
|
||||
@skipIfSlowGradcheckEnv
|
||||
class TestQuantizedOps(TestCase):
|
||||
|
||||
"""Helper function to test quantized activation functions."""
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@ from torch.testing import FileCheck
|
|||
from torch.testing._internal.jit_utils import attrs_with_prefix
|
||||
from torch.testing._internal.jit_utils import get_forward
|
||||
from torch.testing._internal.jit_utils import get_forward_graph
|
||||
from torch.testing._internal.common_utils import skipIfSlowGradcheckEnv
|
||||
|
||||
from torch.jit._recursive import wrap_cpp_module
|
||||
|
||||
|
|
@ -1625,6 +1626,7 @@ class TestQuantizeJitPasses(QuantizationTestCase):
|
|||
torch.jit.save(model, b)
|
||||
|
||||
|
||||
@skipIfSlowGradcheckEnv
|
||||
class TestQuantizeJitOps(QuantizationTestCase):
|
||||
"""Test graph mode post training static quantization works
|
||||
for individual ops end to end.
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import torch
|
|||
import torch.backends.cudnn
|
||||
import torch.utils.cpp_extension
|
||||
from torch.utils.cpp_extension import CUDA_HOME, ROCM_HOME
|
||||
from torch.testing._internal.common_utils import gradcheck
|
||||
from torch.testing._internal.common_utils import gradcheck, skipIfSlowGradcheckEnv
|
||||
|
||||
|
||||
TEST_CUDA = torch.cuda.is_available() and CUDA_HOME is not None
|
||||
|
|
@ -37,7 +37,8 @@ def remove_build_path():
|
|||
if os.path.exists(default_build_root):
|
||||
shutil.rmtree(default_build_root)
|
||||
|
||||
|
||||
# There's only one test that runs gracheck, run slow mode manually
|
||||
@skipIfSlowGradcheckEnv
|
||||
class TestCppExtensionJIT(common.TestCase):
|
||||
"""Tests just-in-time cpp extensions.
|
||||
Don't confuse this with the PyTorch JIT (aka TorchScript).
|
||||
|
|
@ -864,7 +865,8 @@ class TestCppExtensionJIT(common.TestCase):
|
|||
a = torch.randn(5, 5, requires_grad=True)
|
||||
b = torch.randn(5, 5, requires_grad=True)
|
||||
|
||||
gradcheck(torch.ops.my.add, [a, b], eps=1e-2)
|
||||
for fast_mode in (True, False):
|
||||
gradcheck(torch.ops.my.add, [a, b], eps=1e-2, fast_mode=fast_mode)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ from torch.testing._internal.common_utils import (
|
|||
IS_WINDOWS,
|
||||
find_library_location,
|
||||
run_tests,
|
||||
skipIfSlowGradcheckEnv,
|
||||
)
|
||||
from torch.testing._internal.jit_utils import JitTestCase
|
||||
|
||||
|
|
@ -4072,6 +4073,7 @@ TestFunctionalTracing.generate_tests()
|
|||
instantiate_device_type_tests(TestOperatorSignatures, globals())
|
||||
|
||||
@skipIfNoTorchVision
|
||||
@skipIfSlowGradcheckEnv
|
||||
class TestVisionTracing(JitTestCase):
|
||||
def setUp(self):
|
||||
# Checking for mutable operations while tracing is feature flagged
|
||||
|
|
|
|||
Loading…
Reference in a new issue