We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3c2200c commit 09c133bCopy full SHA for 09c133b
1 file changed
docs/src/writing_good_rules.md
@@ -34,6 +34,11 @@ The `ZeroTangent()` object exists as an alternative to directly returning `0` or
34
It allows more optimal computation when chaining pullbacks/pushforwards, to avoid work.
35
They should be used where possible.
36
37
+However, sometimes for performance reasons this is not ideal.
38
+Especially, if it is to replace a scalar, and is in a type-unstable way.
39
+It causes problems if mapping over such pullbacks/pushforwards.
40
+This woull be solved once [JuliaLang/julia#38241](https://github.com/JuliaLang/julia/issues/38241) has been addressed.
41
+
42
## Use `Thunk`s appropriately
43
44
If work is only required for one of the returned differentials, then it should be wrapped in a `@thunk` (potentially using a `begin`-`end` block).
0 commit comments