Skip to content

Commit db12967

Browse files
author
Samantha Andow
authored
[test_jvpvjp] check if custom formula is available (#821)
* [jvpvjp] check if custom formula is available * add wording
1 parent 20e9216 commit db12967

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/test_ops.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,6 +1262,9 @@ def reference(primals, cotangents, primals_tangents, cotangents_tangents):
12621262
'nn.functional.layer_norm'
12631263
}
12641264
if op.name in FUNCTORCH_HAS_FORMULA_BUT_NOT_PYTORCH:
1265+
self.assertFalse(op.supports_fwgrad_bwgrad,
1266+
f"{op.name} now supports forward over reverse without a decomposition. " +
1267+
"Please remove the decomposition version")
12651268
def is_differentiable(t):
12661269
return isinstance(t, torch.Tensor) and t.dtype == torch.float32
12671270
args = (cotangents, *primals)

0 commit comments

Comments
 (0)