Skip to content

Commit

Permalink
fix cpu test
Browse files Browse the repository at this point in the history
  • Loading branch information
msaroufim committed Jul 20, 2023
1 parent cf7cafa commit d635b44
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/inductor/test_torchinductor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2014,7 +2014,6 @@ def fn(a):
with self.assertRaisesRegex(RuntimeError, ""):
fn(torch.randn(1, 5))


def test_softshrink_backward(self):
grad_output = torch.randn(1)
lambd = 0.5
Expand All @@ -2023,7 +2022,10 @@ def fn(a, grad_output, lambd):
a = a.cos()
return torch.ops.aten.softshrink_backward(grad_output, a, lambd)

self.common(fn, (torch.randn(1), grad_output, lambd),)
self.common(
fn,
(torch.randn(10), grad_output, lambd),
)

def test_inductor_assert(self):
@torch._dynamo.optimize("inductor", dynamic=True)
Expand Down

0 comments on commit d635b44

Please sign in to comment.