You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- This is primarily intended for operator overloading based AD systems which will generate overloads for primal function based for their overloaded types based on the existance of an `rrule`/`frule`.
12
-
- A source code generation based AD can also use this by overloading their transform generating function directly so as not to recursively generate a transform but to just return the rule.
13
-
- This does not play nice with Revise.jl, adding or modifying rules in loaded files will not be reflected until a manual refresh, and deleting rules will not be reflected at all.
11
+
- This is primarily intended for operator overloading based AD systems which will generate overloads for primal function based for their overloaded types based on the existance of an `rrule`/`frule`.
12
+
- A source code generation based AD can also use this by overloading their transform generating function directly so as not to recursively generate a transform but to just return the rule.
13
+
- This does not play nice with Revise.jl, adding or modifying rules in loaded files will not be reflected until a manual refresh, and deleting rules will not be reflected at all.
14
14
2. Source code tranform based on inserting branches that check of `rrule`/`frule` return `nothing`
15
-
- if the `rrule`/`frule` returns a rule result then use it, if it return `nothing` then do normal AD path
16
-
- In theory type inference optimizes these branchs out; in practice it may not.
17
-
- This is a fairly simple Cassette overdub (or similar) of all calls, and is suitable for overloading based AD or source code transformation.
15
+
- if the `rrule`/`frule` returns a rule result then use it, if it return `nothing` then do normal AD path
16
+
- In theory type inference optimizes these branchs out; in practice it may not.
17
+
- This is a fairly simple Cassette overdub (or similar) of all calls, and is suitable for overloading based AD or source code transformation.
18
18
3. Source code transform based on `rrule`/`frule` method-table
19
-
- Always use `rrule`/`frule` iff and only if use the rules that exist, else generate normal AD path.
20
-
- This avoids having branches in your generated code.
21
-
- This requires maintaining your own back-edges
22
-
- This is pretty hard-code even by the standard of source code tranformations
19
+
- Always use `rrule`/`frule` iff and only if use the rules that exist, else generate normal AD path.
20
+
- This avoids having branches in your generated code.
21
+
- This requires maintaining your own back-edges
22
+
- This is pretty hard-code even by the standard of source code tranformations
0 commit comments