Skip to content

Commit 65874b7

Browse files
committed
Update on "Registered _like metas"
[ghstack-poisoned]
2 parents 5000aeb + ed5d849 commit 65874b7

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

functorch/test/test_aotdispatch.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@
5656
warnings.warn("Some tests use networkx but it was not installed",
5757
UserWarning)
5858

59+
try:
60+
import sympy # noqa: F401
61+
HAS_SYMPY = True
62+
except ImportError:
63+
HAS_SYMPY = False
64+
skipIfNoSympy = unittest.skipIf(not HAS_SYMPY, "no sympy")
65+
5966
# NB: numpy is a testing dependency!
6067

6168
class AOTTestCase(TestCase):
@@ -1130,6 +1137,7 @@ def test_aot_autograd_exhaustive(self, device, dtype, op):
11301137
_test_aot_autograd_helper(self, device, dtype, op)
11311138

11321139
@ops(op_db, allowed_dtypes=(torch.float,))
1140+
@skipIfNoSympy
11331141
@patch("functorch.compile.config.use_dynamic_shapes", True)
11341142
@patch("functorch.compile.config.use_fake_tensor", True)
11351143
@patch("functorch.compile.config.use_functionalize", False)

0 commit comments

Comments
 (0)