Skip to content

Commit

Permalink
test_autocast_torch_matmul: fix flakiness (#851)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitaved authored Jul 24, 2024
1 parent bb29e5a commit 1c59321
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion thunder/tests/test_autocast.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def foo(a, b):
torch.testing.assert_close(actual, expected)

if requires_grad:
go = torch.randn_like(expected)
go = torch.ones_like(expected) / expected.numel()
eager_grads = torch.autograd.grad(expected, [a, b], go)
jit_grads = torch.autograd.grad(actual, [a, b], go)

Expand Down

0 comments on commit 1c59321

Please sign in to comment.