We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 11333ba commit 23f4a62Copy full SHA for 23f4a62
test/prototype/mx_formats/test_mx_linear.py
@@ -26,6 +26,16 @@
26
pytest.skip("Unsupported PyTorch version", allow_module_level=True)
27
28
29
+# source: https://stackoverflow.com/a/22638709
30
+@pytest.fixture(autouse=True)
31
+def run_around_tests():
32
+ # 1. before test - set up (currently do nothing)
33
+ # 2. run test
34
+ yield
35
+ # 3. after test - teardown
36
+ torch._dynamo.reset()
37
+
38
39
@pytest.mark.skipif(not torch.cuda.is_available(), reason="CUDA not available")
40
@pytest.mark.parametrize("elem_dtype", SUPPORTED_ELEM_DTYPES)
41
@pytest.mark.parametrize("bias", [True, False])
0 commit comments