Skip to content

Commit 904475d

Browse files
samdowzou3519
authored andcommitted
[functorch] glu failing now that test_ops runs again, switch functionalization failures to use expectedfailure
1 parent ac41ef2 commit 904475d

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

functorch/test/test_eager_transforms.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2828,7 +2828,8 @@ def _check_functionalize_correctness(self, f, inpt):
28282828
self.assertEqual(inpt1, inpt2)
28292829
self.assertEqual(inpt1, inpt3)
28302830

2831-
@unittest.skip("RuntimeError: Tensors of type FunctionalTensorWrapper do not have strides")
2831+
# BUG: RuntimeError: Tensors of type FunctionalTensorWrapper do not have strides
2832+
@unittest.expectedFailure
28322833
def test_simple_view(self, device):
28332834

28342835
def f(x: torch.Tensor) -> torch.Tensor:
@@ -2838,7 +2839,8 @@ def f(x: torch.Tensor) -> torch.Tensor:
28382839
return x
28392840
self._check_functionalize_correctness(f, torch.zeros(4, 2, device=device))
28402841

2841-
@unittest.skip("RuntimeError: Tensors of type FunctionalTensorWrapper do not have strides")
2842+
# BUG: RuntimeError: Tensors of type FunctionalTensorWrapper do not have strides
2843+
@unittest.expectedFailure
28422844
def test_multioutput_view(self, device):
28432845

28442846
def f(x: torch.Tensor) -> torch.Tensor:
@@ -2849,7 +2851,9 @@ def f(x: torch.Tensor) -> torch.Tensor:
28492851
return x
28502852
self._check_functionalize_correctness(f, torch.zeros(4, 2, device=device))
28512853

2852-
@unittest.skip("RuntimeError: Tensors of type FunctionalTensorWrapper do not have strides")
2854+
2855+
# BUG: RuntimeError: Tensors of type FunctionalTensorWrapper do not have strides
2856+
@unittest.expectedFailure
28532857
def test_inplace_view(self, device):
28542858

28552859
def f(x: torch.Tensor) -> torch.Tensor:
@@ -2875,7 +2879,8 @@ def f(x, y, z) -> torch.Tensor:
28752879
out_actual = functionalize(f)(x, y, z)
28762880
self.assertEqual(out_expected, out_actual)
28772881

2878-
@unittest.skip("RuntimeError: Tensors of type FunctionalTensorWrapper do not have strides")
2882+
# BUG: RuntimeError: Tensors of type FunctionalTensorWrapper do not have strides
2883+
@unittest.expectedFailure
28792884
def test_multioutput_inplace_slice_view(self, device):
28802885

28812886
def f(x: torch.Tensor) -> torch.Tensor:

functorch/test/test_ops.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,8 @@ def test_vmapjvpall(self, device, dtype, op):
872872
xfail('nn.functional.binary_cross_entropy_with_logits', ''),
873873
xfail('linalg.norm', 'subgradients_at_zero'),
874874
xfail('nn.functional.max_unpool1d', 'grad'),
875-
xfail('lu_unpack')
875+
xfail('lu_unpack'),
876+
xfail('glu'),
876877
}))
877878
@toleranceOverride({torch.float32: tol(atol=1e-04, rtol=1e-04)})
878879
def test_vmapjvpall_has_batch_rule(self, device, dtype, op):

0 commit comments

Comments
 (0)