mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[functorch] Exclude failing tests, add xfail test for torch.tensor
This commit is contained in:
@ -463,6 +463,14 @@ class TestGradTransform(TestCase):
|
||||
result = grad(f2)(x)
|
||||
self.assertEqual(result, (x <= 0).type_as(x))
|
||||
|
||||
@unittest.expectedFailure
|
||||
def test_tensor_ctor_inside_grad(self, device):
|
||||
def foo(x):
|
||||
return x * torch.tensor(2., device=device)
|
||||
|
||||
x = torch.tensor(3.14, device=device)
|
||||
functorch.grad(foo)(x)
|
||||
|
||||
|
||||
class TestVmapOfGrad(TestCase):
|
||||
def test_per_sample_grads_inplace_view(self, device):
|
||||
|
@ -333,6 +333,7 @@ class TestOperators(TestCase):
|
||||
'norm',
|
||||
'resolve_conj',
|
||||
'to_sparse',
|
||||
'clamp',
|
||||
}
|
||||
if op.name in op_skip:
|
||||
self.skipTest("Skipped; Expected failures")
|
||||
|
Reference in New Issue
Block a user