From 84bc9dbda6cd08b563f789457856e7fd1b8e1449 Mon Sep 17 00:00:00 2001 From: beverlylytle Date: Wed, 20 Nov 2024 13:38:38 +0200 Subject: [PATCH] avoid zero in vjp test for leaky_relu --- thunder/tests/opinfos.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/thunder/tests/opinfos.py b/thunder/tests/opinfos.py index 7caaf7df6..5cc5c8907 100644 --- a/thunder/tests/opinfos.py +++ b/thunder/tests/opinfos.py @@ -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)