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
3434It allows more optimal computation when chaining pullbacks/pushforwards, to avoid work.
3535They should be used where possible.
3636
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+
3742## Use ` Thunk ` s appropriately
3843
3944If 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