Skip to content

Commit

Permalink
avoid zero in vjp test for leaky_relu
Browse files Browse the repository at this point in the history
  • Loading branch information
beverlylytle committed Nov 20, 2024
1 parent b43481f commit 84bc9db
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions thunder/tests/opinfos.py
Original file line number Diff line number Diff line change
Expand Up @@ -1674,6 +1674,8 @@ def gen(op, device, dtype, requires_grad):
dtypes=(datatypes.floating,),
sample_input_generator=get_elementwise_unary_with_kwargs_generator([{}, {"negative_slope": 0.5}]),
torch_reference=torch.nn.functional.leaky_relu,
# fdm.jvp, which is used in test_vjp_correctness, behaves badly on (-1e-6, 1e-6) for this function
singularity_fn=lambda x: x,
test_directives=(),
)
elementwise_unary_ops.append(leaky_relu_opinfo)
Expand Down

0 comments on commit 84bc9db

Please sign in to comment.