Skip to content

Commit 23f4a62

Browse files
committed
Update
[ghstack-poisoned]
1 parent 11333ba commit 23f4a62

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/prototype/mx_formats/test_mx_linear.py

+10
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@
2626
pytest.skip("Unsupported PyTorch version", allow_module_level=True)
2727

2828

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+
2939
@pytest.mark.skipif(not torch.cuda.is_available(), reason="CUDA not available")
3040
@pytest.mark.parametrize("elem_dtype", SUPPORTED_ELEM_DTYPES)
3141
@pytest.mark.parametrize("bias", [True, False])

0 commit comments

Comments
 (0)