Skip to content

Commit

Permalink
build based on 22ff5b4
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Mar 20, 2024
1 parent 7590d7a commit d5abe97
Show file tree
Hide file tree
Showing 10 changed files with 155 additions and 43 deletions.
46 changes: 25 additions & 21 deletions previews/PR1300/api/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion previews/PR1300/dev_docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
julia -e "using Pkg; pkg\"add LLVM_full_jll@${LLVM_MAJOR_VER}\""
LLVM_DIR=`julia -e "using LLVM_full_jll; print(LLVM_full_jll.artifact_dir)"`
echo "LLVM_DIR=$LLVM_DIR"
cmake ../enzyme/ -G Ninja -DENZYME_EXTERNAL_SHARED_LIB=ON -DLLVM_DIR=${LLVM_DIR} -DLLVM_EXTERNAL_LIT=${LLVM_DIR}/tools/lit/lit.py</code></pre><h3 id="Manual-build-of-Julia"><a class="docs-heading-anchor" href="#Manual-build-of-Julia">Manual build of Julia</a><a id="Manual-build-of-Julia-1"></a><a class="docs-heading-anchor-permalink" href="#Manual-build-of-Julia" title="Permalink"></a></h3><pre><code class="nohighlight hljs">cmake ../enzyme/ -G Ninja -DENZYME_EXTERNAL_SHARED_LIB=ON -DLLVM_DIR=${PATH_TO_BUILDDIR_OF_JULIA}/usr/lib/cmake/llvm/</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../pullbacks/">« Implementing pullbacks</a><a class="docs-footer-nextpage" href="../internal_api/">Internal API »</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></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Wednesday 21 February 2024 14:59">Wednesday 21 February 2024</span>. Using Julia version 1.10.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
cmake ../enzyme/ -G Ninja -DENZYME_EXTERNAL_SHARED_LIB=ON -DLLVM_DIR=${LLVM_DIR} -DLLVM_EXTERNAL_LIT=${LLVM_DIR}/tools/lit/lit.py</code></pre><h3 id="Manual-build-of-Julia"><a class="docs-heading-anchor" href="#Manual-build-of-Julia">Manual build of Julia</a><a id="Manual-build-of-Julia-1"></a><a class="docs-heading-anchor-permalink" href="#Manual-build-of-Julia" title="Permalink"></a></h3><pre><code class="nohighlight hljs">cmake ../enzyme/ -G Ninja -DENZYME_EXTERNAL_SHARED_LIB=ON -DLLVM_DIR=${PATH_TO_BUILDDIR_OF_JULIA}/usr/lib/cmake/llvm/</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../pullbacks/">« Implementing pullbacks</a><a class="docs-footer-nextpage" href="../internal_api/">Internal API »</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></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Wednesday 20 March 2024 22:31">Wednesday 20 March 2024</span>. Using Julia version 1.10.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
2 changes: 1 addition & 1 deletion previews/PR1300/generated/autodiff/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@

hess[1][2] == 1.0</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">true</code></pre><p>as well as the second row/column</p><pre><code class="language-julia hljs">hess[2][1] == 1.0

hess[2][2] == 0.0</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">true</code></pre><hr/><p><em>This page was generated using <a href="https://github.com/fredrikekre/Literate.jl">Literate.jl</a>.</em></p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../box/">« Box model</a><a class="docs-footer-nextpage" href="../custom_rule/">Custom 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></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Wednesday 21 February 2024 14:59">Wednesday 21 February 2024</span>. Using Julia version 1.10.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
hess[2][2] == 0.0</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">true</code></pre><hr/><p><em>This page was generated using <a href="https://github.com/fredrikekre/Literate.jl">Literate.jl</a>.</em></p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../box/">« Box model</a><a class="docs-footer-nextpage" href="../custom_rule/">Custom 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></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Wednesday 20 March 2024 22:31">Wednesday 20 March 2024</span>. Using Julia version 1.10.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
8 changes: 4 additions & 4 deletions previews/PR1300/generated/box/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
Duplicated([Tbar; Sbar], dstate_old),
Duplicated(out_now, dout_now),
Duplicated(out_old, dout_old),
parameters,
Const(parameters),
Const(10*parameters.day)
)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">((nothing, nothing, nothing, nothing, nothing, nothing),)</code></pre><p>In order to run Enzyme on <code>one_step_forward</code>, we&#39;ve needed to provide quite a few placeholders, and wrap everything in <a href="../../api/#EnzymeCore.Duplicated"><code>Duplicated</code></a> as all components of our function are vectors, not scalars. Let&#39;s go through and see what Enzyme did with all of those placeholders.</p><p>First we can look at what happened to the zero vectors <code>out_now</code> and <code>out_old</code>:</p><pre><code class="language-julia hljs">@show out_now, out_old</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">([20.101970893653334, 0.9646957730133332, 1.0, 35.50026715349918, 34.49973284650082, 34.5], [20.025492723413333, 0.9911739432533333, 1.0, 35.500066788374795, 34.499933211625205, 34.5])</code></pre><p>Comparing to the results of forward func:</p><pre><code class="language-julia hljs">@show states_before_smoother[2], states_after_smoother[2]</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">([20.101970893653334, 0.9646957730133332, 1.0, 35.50026715349918, 34.49973284650082, 34.5], [20.025492723413333, 0.9911739432533333, 1.0, 35.500066788374795, 34.499933211625205, 34.5])</code></pre><p>we see that Enzyme has computed and stored exactly the output of the forward step. Next, let&#39;s look at <code>dstate_now</code>:</p><pre><code class="language-julia hljs">@show dstate_now</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">6-element Vector{Float64}:
0.41666666666666663
Expand All @@ -251,7 +251,7 @@
Duplicated([Tbar; Sbar], dstate_old_new),
Duplicated(out_now, dout_now),
Duplicated(out_old, dout_old),
parameters,
Const(parameters),
Const(10*parameters.day)
)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">((nothing, nothing, nothing, nothing, nothing, nothing),)</code></pre><p>Now checking <code>dstate_now</code> and <code>dstate_old</code> we see</p><pre><code class="language-julia hljs">@show dstate_now_new</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">6-element Vector{Float64}:
0.8333333333333333
Expand Down Expand Up @@ -281,7 +281,7 @@
Duplicated(states_after_smoother[j], dstate_old),
Duplicated(zeros(6), dout_now),
Duplicated(zeros(6), dout_old),
parameters,
Const(parameters),
Const(10*parameters.day)
)

Expand Down Expand Up @@ -362,4 +362,4 @@
9.732210923954578e-5
0.0026401658789532625
0.015152571729925521
0.03212933056407103</code></pre><p>and we get down to a percent difference on the order of <span>$1e^{-5}$</span>, showing Enzyme calculated the correct derivative. Success!</p><hr/><p><em>This page was generated using <a href="https://github.com/fredrikekre/Literate.jl">Literate.jl</a>.</em></p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../../">« Home</a><a class="docs-footer-nextpage" href="../autodiff/">AutoDiff API »</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></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Wednesday 21 February 2024 14:59">Wednesday 21 February 2024</span>. Using Julia version 1.10.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
0.03212933056407103</code></pre><p>and we get down to a percent difference on the order of <span>$1e^{-5}$</span>, showing Enzyme calculated the correct derivative. Success!</p><hr/><p><em>This page was generated using <a href="https://github.com/fredrikekre/Literate.jl">Literate.jl</a>.</em></p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../../">« Home</a><a class="docs-footer-nextpage" href="../autodiff/">AutoDiff API »</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></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Wednesday 20 March 2024 22:31">Wednesday 20 March 2024</span>. Using Julia version 1.10.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit d5abe97

Please sign in to comment.