Skip to content

Commit 8be0c69

Browse files
author
Documenter.jl
committed
build based on 7730f38
1 parent 2f27136 commit 8be0c69

36 files changed

+213
-213
lines changed

dev/.documenter-siteinfo.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"documenter":{"julia_version":"1.6.7","generation_timestamp":"2024-02-23T09:03:55","documenter_version":"1.2.1"}}
1+
{"documenter":{"julia_version":"1.6.7","generation_timestamp":"2024-03-01T03:56:43","documenter_version":"1.2.1"}}

dev/FAQ.html

+1-1
Large diffs are not rendered by default.

dev/ad_author/call_back_into_ad.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
function ChainRulesCore.rrule_via_ad(::MyReverseOnlyADRuleConfig, f, args...)
55
...
66
return y, pullback
7-
end</code></pre><p>Note that it is not actually required that the same AD is used for forward and reverse. For example <a href="https://github.com/invenia/Nabla.jl/">Nabla.jl</a> is a reverse mode AD. It might declare that it <code>HasForwardsMode</code>, and then define a wrapper around <a href="https://github.com/JuliaDiff/ForwardDiff.jl">ForwardDiff.jl</a> in order to provide that capacity.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="use_in_ad_system.html">« Usage in AD</a><a class="docs-footer-nextpage" href="opt_out.html">Support opting out of rules »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Friday 23 February 2024 09:03">Friday 23 February 2024</span>. Using Julia version 1.6.7.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
7+
end</code></pre><p>Note that it is not actually required that the same AD is used for forward and reverse. For example <a href="https://github.com/invenia/Nabla.jl/">Nabla.jl</a> is a reverse mode AD. It might declare that it <code>HasForwardsMode</code>, and then define a wrapper around <a href="https://github.com/JuliaDiff/ForwardDiff.jl">ForwardDiff.jl</a> in order to provide that capacity.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="use_in_ad_system.html">« Usage in AD</a><a class="docs-footer-nextpage" href="opt_out.html">Support opting out of rules »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Friday 1 March 2024 03:56">Friday 1 March 2024</span>. Using Julia version 1.6.7.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>

dev/ad_author/opt_out.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
y, pullback = perform_ad_via_decomposition(r, xs) # do AD without hitting the rrule
55
else
66
y, pullback = res
7-
end</code></pre><p>The Julia compiler will specialize based on inferring the return type of <code>rrule</code>, and so can remove that branch.</p><h3 id="no_rrule-/-no_frule-has-a-method"><a class="docs-heading-anchor" href="#no_rrule-/-no_frule-has-a-method"><code>no_rrule</code> / <code>no_frule</code> has a method</a><a id="no_rrule-/-no_frule-has-a-method-1"></a><a class="docs-heading-anchor-permalink" href="#no_rrule-/-no_frule-has-a-method" title="Permalink"></a></h3><p><code>@opt_out</code> also defines a method for <a href="../api.html#ChainRulesCore.no_frule"><code>ChainRulesCore.no_frule</code></a> or <a href="../api.html#ChainRulesCore.no_rrule"><code>ChainRulesCore.no_rrule</code></a>. The body of this method doesn&#39;t matter, what matters is that it is a method-table. A simple thing you can do with this is not support opting out. To do this, filter all methods from the <code>rrule</code>/<code>frule</code> method table that also occur in the <code>no_frule</code>/<code>no_rrule</code> table. This will thus avoid ever hitting an <code>rrule</code>/<code>frule</code> that returns <code>nothing</code> (and thus prevents your library from erroring). This is easily done, though it does mean ignoring the user&#39;s stated desire to opt out of the rule.</p><p>More complex you can use this to generate code that triggers your AD. If for a given signature there is a more specific method in the <code>no_rrule</code>/<code>no_frule</code> method-table, than the one that would be hit from the <code>rrule</code>/<code>frule</code> table (Excluding the one that exactly matches which will return <code>nothing</code>) then you know that the rule should not be used. You can, likely by looking at the primal method table, workout which method you would have it if the rule had not been defined, and then <code>invoke</code> it.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="call_back_into_ad.html">« Support calling back into ADs</a><a class="docs-footer-nextpage" href="../maths/propagators.html">The propagators: pushforward and pullback »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Friday 23 February 2024 09:03">Friday 23 February 2024</span>. Using Julia version 1.6.7.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
7+
end</code></pre><p>The Julia compiler will specialize based on inferring the return type of <code>rrule</code>, and so can remove that branch.</p><h3 id="no_rrule-/-no_frule-has-a-method"><a class="docs-heading-anchor" href="#no_rrule-/-no_frule-has-a-method"><code>no_rrule</code> / <code>no_frule</code> has a method</a><a id="no_rrule-/-no_frule-has-a-method-1"></a><a class="docs-heading-anchor-permalink" href="#no_rrule-/-no_frule-has-a-method" title="Permalink"></a></h3><p><code>@opt_out</code> also defines a method for <a href="../api.html#ChainRulesCore.no_frule"><code>ChainRulesCore.no_frule</code></a> or <a href="../api.html#ChainRulesCore.no_rrule"><code>ChainRulesCore.no_rrule</code></a>. The body of this method doesn&#39;t matter, what matters is that it is a method-table. A simple thing you can do with this is not support opting out. To do this, filter all methods from the <code>rrule</code>/<code>frule</code> method table that also occur in the <code>no_frule</code>/<code>no_rrule</code> table. This will thus avoid ever hitting an <code>rrule</code>/<code>frule</code> that returns <code>nothing</code> (and thus prevents your library from erroring). This is easily done, though it does mean ignoring the user&#39;s stated desire to opt out of the rule.</p><p>More complex you can use this to generate code that triggers your AD. If for a given signature there is a more specific method in the <code>no_rrule</code>/<code>no_frule</code> method-table, than the one that would be hit from the <code>rrule</code>/<code>frule</code> table (Excluding the one that exactly matches which will return <code>nothing</code>) then you know that the rule should not be used. You can, likely by looking at the primal method table, workout which method you would have it if the rule had not been defined, and then <code>invoke</code> it.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="call_back_into_ad.html">« Support calling back into ADs</a><a class="docs-footer-nextpage" href="../maths/propagators.html">The propagators: pushforward and pullback »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Friday 1 March 2024 03:56">Friday 1 March 2024</span>. Using Julia version 1.6.7.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>

0 commit comments

Comments
 (0)