File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,11 @@ The `ZeroTangent()` object exists as an alternative to directly returning `0` or
34
34
It allows more optimal computation when chaining pullbacks/pushforwards, to avoid work.
35
35
They should be used where possible.
36
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
+
37
42
## Use ` Thunk ` s appropriately
38
43
39
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).
You can’t perform that action at this time.
0 commit comments