mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[dynamo] Graph break when faking named tensors (#120779)
Fixes #120644 Pull Request resolved: https://github.com/pytorch/pytorch/pull/120779 Approved by: https://github.com/zou3519
This commit is contained in:
committed by
PyTorch MergeBot
parent
1104e0798c
commit
a911eb74ae
@ -686,10 +686,12 @@ class TestNamedTensor(TestCase):
|
||||
|
||||
self.assertEqual(op(a, a).names, ('N', 'C'))
|
||||
self.assertEqual(op(a, c).names, ('N', 'C'))
|
||||
|
||||
with self.assertRaisesRegex(RuntimeError, "do not match"):
|
||||
# TODO: dynamo will throw a slightly different
|
||||
# error message because it's adding fake tensors
|
||||
# `must match the size of` portion is the dynamo error
|
||||
with self.assertRaisesRegex(RuntimeError, "do not match|must match the size of"):
|
||||
op(a, d)
|
||||
with self.assertRaisesRegex(RuntimeError, "do not match"):
|
||||
with self.assertRaisesRegex(RuntimeError, "do not match|must match the size of"):
|
||||
op(a, b)
|
||||
|
||||
def test_wildcard(op):
|
||||
|
Reference in New Issue
Block a user