|
501 | 501 | tags: [] |
502 | 502 | "evaluation" => 2-element BenchmarkTools.BenchmarkGroup: |
503 | 503 | tags: [] |
504 | | - "linked" => Trial(390.000 ns) |
505 | | - "standard" => Trial(340.000 ns) |
| 504 | + "linked" => Trial(367.000 ns) |
| 505 | + "standard" => Trial(299.000 ns) |
506 | 506 | "gradient" => 4-element BenchmarkTools.BenchmarkGroup: |
507 | 507 | tags: [] |
508 | 508 | "ADTypes.AutoForwardDiff(chunksize=0)" => 2-element BenchmarkTools.BenchmarkGroup: |
509 | 509 | tags: ["ForwardDiff"] |
510 | | - "linked" => Trial(641.000 ns) |
511 | | - "standard" => Trial(570.000 ns) |
| 510 | + "linked" => Trial(563.000 ns) |
| 511 | + "standard" => Trial(501.000 ns) |
512 | 512 | "ADTypes.AutoReverseDiff()" => 2-element BenchmarkTools.BenchmarkGroup: |
513 | 513 | tags: ["ReverseDiff"] |
514 | | - "linked" => Trial(14.532 μs) |
515 | | - "standard" => Trial(13.150 μs) |
| 514 | + "linked" => Trial(13.077 μs) |
| 515 | + "standard" => Trial(12.128 μs) |
516 | 516 | "ADTypes.AutoReverseDiff(compile=true)" => 2-element BenchmarkTools.BenchmarkGroup: |
517 | 517 | tags: ["ReverseDiff [compiled]"] |
518 | | - "linked" => Trial(2.473 μs) |
519 | | - "standard" => Trial(2.394 μs) |
| 518 | + "linked" => Trial(2.156 μs) |
| 519 | + "standard" => Trial(2.047 μs) |
520 | 520 | "ADTypes.AutoZygote()" => 2-element BenchmarkTools.BenchmarkGroup: |
521 | 521 | tags: ["Zygote"] |
522 | | - "linked" => Trial(1.045 ms) |
523 | | - "standard" => Trial(736.453 μs)</code></pre><h2 id="API"><a class="docs-heading-anchor" href="#API">API</a><a id="API-1"></a><a class="docs-heading-anchor-permalink" href="#API" title="Permalink"></a></h2><ul><li><a href="#TuringBenchmarking.benchmark_model-Tuple{DynamicPPL.Model}"><code>TuringBenchmarking.benchmark_model</code></a></li><li><a href="#TuringBenchmarking.extract_stan_data"><code>TuringBenchmarking.extract_stan_data</code></a></li><li><a href="#TuringBenchmarking.make_stan_suite"><code>TuringBenchmarking.make_stan_suite</code></a></li><li><a href="#TuringBenchmarking.make_turing_suite-Tuple{DynamicPPL.Model}"><code>TuringBenchmarking.make_turing_suite</code></a></li><li><a href="#TuringBenchmarking.stan_model_string"><code>TuringBenchmarking.stan_model_string</code></a></li></ul><article><details class="docstring" open="true"><summary id="TuringBenchmarking.benchmark_model-Tuple{DynamicPPL.Model}"><a class="docstring-binding" href="#TuringBenchmarking.benchmark_model-Tuple{DynamicPPL.Model}"><code>TuringBenchmarking.benchmark_model</code></a> — <span class="docstring-category">Method</span></summary><section><div><pre><code class="language-julia hljs">benchmark_model(model::Turing.Model; suite_kwargs..., kwargs...)</code></pre><p>Create and run a benchmark suite for <code>model</code>.</p><p>The benchmarking suite will be created using <a href="#TuringBenchmarking.make_turing_suite-Tuple{DynamicPPL.Model}"><code>make_turing_suite</code></a>. See <a href="#TuringBenchmarking.make_turing_suite-Tuple{DynamicPPL.Model}"><code>make_turing_suite</code></a> for the available keyword arguments and more information.</p><p><strong>Keyword arguments</strong></p><ul><li><code>suite_kwargs</code>: Keyword arguments passed to <a href="#TuringBenchmarking.make_turing_suite-Tuple{DynamicPPL.Model}"><code>make_turing_suite</code></a>.</li><li><code>kwargs</code>: Keyword arguments passed to <code>BenchmarkTools.run</code>.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/TuringLang/Deprecated/blob/e788739de15856f6d578b9dc2abaa5875786c258/TuringBenchmarking/src/TuringBenchmarking.jl#L64-L75">source</a></section></details></article><article><details class="docstring" open="true"><summary id="TuringBenchmarking.extract_stan_data"><a class="docstring-binding" href="#TuringBenchmarking.extract_stan_data"><code>TuringBenchmarking.extract_stan_data</code></a> — <span class="docstring-category">Function</span></summary><section><div><pre><code class="language-julia hljs">extract_stan_data(model::DynamicPPL.Model)</code></pre><p>Return the data in <code>model</code> in a format consumable by the corresponding Stan model.</p><p>The Stan model requires the return data to be either</p><ol><li>A JSON string representing a dictionary with the data.</li><li>A path to a data file ending in <code>.json</code>.</li></ol></div><a class="docs-sourcelink" target="_blank" href="https://github.com/TuringLang/Deprecated/blob/e788739de15856f6d578b9dc2abaa5875786c258/TuringBenchmarking/src/TuringBenchmarking.jl#L301-L309">source</a></section></details></article><article><details class="docstring" open="true"><summary id="TuringBenchmarking.make_stan_suite"><a class="docstring-binding" href="#TuringBenchmarking.make_stan_suite"><code>TuringBenchmarking.make_stan_suite</code></a> — <span class="docstring-category">Function</span></summary><section><div><pre><code class="language-julia hljs">make_stan_suite(model::Turing.Model; kwargs...)</code></pre><p>Create default benchmark suite for the Stan model corresponding to <code>model</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/TuringLang/Deprecated/blob/e788739de15856f6d578b9dc2abaa5875786c258/TuringBenchmarking/src/TuringBenchmarking.jl#L319-L323">source</a></section></details></article><article><details class="docstring" open="true"><summary id="TuringBenchmarking.make_turing_suite-Tuple{DynamicPPL.Model}"><a class="docstring-binding" href="#TuringBenchmarking.make_turing_suite-Tuple{DynamicPPL.Model}"><code>TuringBenchmarking.make_turing_suite</code></a> — <span class="docstring-category">Method</span></summary><section><div><pre><code class="language-julia hljs">make_turing_suite(model::Turing.Model; kwargs...)</code></pre><p>Create default benchmark suite for <code>model</code>.</p><p><strong>Keyword arguments</strong></p><ul><li><code>adbackends</code>: a collection of adbackends to use, specified either as a type from</li></ul><p>ADTypes.jl or using a <code>Symbol</code>. Defaults to <code>ADTypes.AbstractADType[ADTypes.AutoForwardDiff(chunksize=0), ADTypes.AutoReverseDiff(), ADTypes.AutoReverseDiff(compile=true), ADTypes.AutoZygote()]</code>.</p><ul><li><code>run_once=true</code>: if <code>true</code>, the body of each benchmark will be run once to avoid compilation to be included in the timings (this may occur if compilation runs longer than the allowed time limit).</li><li><code>check=false</code>: if <code>true</code>, the log-density evaluations and the gradients will be compared against each other to ensure that they are consistent. Note that this will force <code>run_once=true</code>.</li><li><code>error_on_failed_check=false</code>: if <code>true</code>, an error will be thrown if the check fails rather than just printing a warning, as is done by default.</li><li><code>error_on_failed_backend=false</code>: if <code>true</code>, an error will be thrown if the evaluation of the log-density or the gradient fails for any of the backends rather than just printing a warning, as is done by default.</li><li><code>varinfo</code>: the <code>VarInfo</code> to use. Defaults to <code>DynamicPPL.VarInfo(model)</code>.</li><li><code>sampler</code>: the <code>Sampler</code> to use. Defaults to <code>nothing</code> (i.e. no sampler).</li><li><code>context</code>: the <code>Context</code> to use. Defaults to <code>DynamicPPL.DefaultContext()</code>.</li><li><code>θ</code>: the parameters to use. Defaults to <code>rand(Vector, model)</code>.</li><li><code>θ_linked</code>: the linked parameters to use. Defaults to <code>randn(d)</code> where <code>d</code> is the length of the linked parameters..</li><li><code>atol</code>: the absolute tolerance to use for comparisons.</li><li><code>rtol</code>: the relative tolerance to use for comparisons.</li></ul><p><strong>Notes</strong></p><ul><li>A separate "parameter" instance (<code>DynamicPPL.VarInfo</code>) will be created for <em>each test</em>. Hence if you have a particularly large model, you might want to only pass one <code>adbackend</code> at the time.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/TuringLang/Deprecated/blob/e788739de15856f6d578b9dc2abaa5875786c258/TuringBenchmarking/src/TuringBenchmarking.jl#L110-L142">source</a></section></details></article><article><details class="docstring" open="true"><summary id="TuringBenchmarking.stan_model_string"><a class="docstring-binding" href="#TuringBenchmarking.stan_model_string"><code>TuringBenchmarking.stan_model_string</code></a> — <span class="docstring-category">Function</span></summary><section><div><pre><code class="language-julia hljs">stan_model_string(model::DynamicPPL.Model)</code></pre><p>Return a string defining the Stan model corresponding to <code>model</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/TuringLang/Deprecated/blob/e788739de15856f6d578b9dc2abaa5875786c258/TuringBenchmarking/src/TuringBenchmarking.jl#L312-L316">source</a></section></details></article></article><nav class="docs-footer"><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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.17.0 on <span class="colophon-date" title="Wednesday 11 March 2026 10:28">Wednesday 11 March 2026</span>. Using Julia version 1.12.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> |
| 522 | + "linked" => Trial(1.170 ms) |
| 523 | + "standard" => Trial(825.821 μs)</code></pre><h2 id="API"><a class="docs-heading-anchor" href="#API">API</a><a id="API-1"></a><a class="docs-heading-anchor-permalink" href="#API" title="Permalink"></a></h2><ul><li><a href="#TuringBenchmarking.benchmark_model-Tuple{DynamicPPL.Model}"><code>TuringBenchmarking.benchmark_model</code></a></li><li><a href="#TuringBenchmarking.extract_stan_data"><code>TuringBenchmarking.extract_stan_data</code></a></li><li><a href="#TuringBenchmarking.make_stan_suite"><code>TuringBenchmarking.make_stan_suite</code></a></li><li><a href="#TuringBenchmarking.make_turing_suite-Tuple{DynamicPPL.Model}"><code>TuringBenchmarking.make_turing_suite</code></a></li><li><a href="#TuringBenchmarking.stan_model_string"><code>TuringBenchmarking.stan_model_string</code></a></li></ul><article><details class="docstring" open="true"><summary id="TuringBenchmarking.benchmark_model-Tuple{DynamicPPL.Model}"><a class="docstring-binding" href="#TuringBenchmarking.benchmark_model-Tuple{DynamicPPL.Model}"><code>TuringBenchmarking.benchmark_model</code></a> — <span class="docstring-category">Method</span></summary><section><div><pre><code class="language-julia hljs">benchmark_model(model::Turing.Model; suite_kwargs..., kwargs...)</code></pre><p>Create and run a benchmark suite for <code>model</code>.</p><p>The benchmarking suite will be created using <a href="#TuringBenchmarking.make_turing_suite-Tuple{DynamicPPL.Model}"><code>make_turing_suite</code></a>. See <a href="#TuringBenchmarking.make_turing_suite-Tuple{DynamicPPL.Model}"><code>make_turing_suite</code></a> for the available keyword arguments and more information.</p><p><strong>Keyword arguments</strong></p><ul><li><code>suite_kwargs</code>: Keyword arguments passed to <a href="#TuringBenchmarking.make_turing_suite-Tuple{DynamicPPL.Model}"><code>make_turing_suite</code></a>.</li><li><code>kwargs</code>: Keyword arguments passed to <code>BenchmarkTools.run</code>.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/TuringLang/Deprecated/blob/1cf7f84114cc36bd6c9202ebee19a61e1c3cb726/TuringBenchmarking/src/TuringBenchmarking.jl#L64-L75">source</a></section></details></article><article><details class="docstring" open="true"><summary id="TuringBenchmarking.extract_stan_data"><a class="docstring-binding" href="#TuringBenchmarking.extract_stan_data"><code>TuringBenchmarking.extract_stan_data</code></a> — <span class="docstring-category">Function</span></summary><section><div><pre><code class="language-julia hljs">extract_stan_data(model::DynamicPPL.Model)</code></pre><p>Return the data in <code>model</code> in a format consumable by the corresponding Stan model.</p><p>The Stan model requires the return data to be either</p><ol><li>A JSON string representing a dictionary with the data.</li><li>A path to a data file ending in <code>.json</code>.</li></ol></div><a class="docs-sourcelink" target="_blank" href="https://github.com/TuringLang/Deprecated/blob/1cf7f84114cc36bd6c9202ebee19a61e1c3cb726/TuringBenchmarking/src/TuringBenchmarking.jl#L301-L309">source</a></section></details></article><article><details class="docstring" open="true"><summary id="TuringBenchmarking.make_stan_suite"><a class="docstring-binding" href="#TuringBenchmarking.make_stan_suite"><code>TuringBenchmarking.make_stan_suite</code></a> — <span class="docstring-category">Function</span></summary><section><div><pre><code class="language-julia hljs">make_stan_suite(model::Turing.Model; kwargs...)</code></pre><p>Create default benchmark suite for the Stan model corresponding to <code>model</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/TuringLang/Deprecated/blob/1cf7f84114cc36bd6c9202ebee19a61e1c3cb726/TuringBenchmarking/src/TuringBenchmarking.jl#L319-L323">source</a></section></details></article><article><details class="docstring" open="true"><summary id="TuringBenchmarking.make_turing_suite-Tuple{DynamicPPL.Model}"><a class="docstring-binding" href="#TuringBenchmarking.make_turing_suite-Tuple{DynamicPPL.Model}"><code>TuringBenchmarking.make_turing_suite</code></a> — <span class="docstring-category">Method</span></summary><section><div><pre><code class="language-julia hljs">make_turing_suite(model::Turing.Model; kwargs...)</code></pre><p>Create default benchmark suite for <code>model</code>.</p><p><strong>Keyword arguments</strong></p><ul><li><code>adbackends</code>: a collection of adbackends to use, specified either as a type from</li></ul><p>ADTypes.jl or using a <code>Symbol</code>. Defaults to <code>ADTypes.AbstractADType[ADTypes.AutoForwardDiff(chunksize=0), ADTypes.AutoReverseDiff(), ADTypes.AutoReverseDiff(compile=true), ADTypes.AutoZygote()]</code>.</p><ul><li><code>run_once=true</code>: if <code>true</code>, the body of each benchmark will be run once to avoid compilation to be included in the timings (this may occur if compilation runs longer than the allowed time limit).</li><li><code>check=false</code>: if <code>true</code>, the log-density evaluations and the gradients will be compared against each other to ensure that they are consistent. Note that this will force <code>run_once=true</code>.</li><li><code>error_on_failed_check=false</code>: if <code>true</code>, an error will be thrown if the check fails rather than just printing a warning, as is done by default.</li><li><code>error_on_failed_backend=false</code>: if <code>true</code>, an error will be thrown if the evaluation of the log-density or the gradient fails for any of the backends rather than just printing a warning, as is done by default.</li><li><code>varinfo</code>: the <code>VarInfo</code> to use. Defaults to <code>DynamicPPL.VarInfo(model)</code>.</li><li><code>sampler</code>: the <code>Sampler</code> to use. Defaults to <code>nothing</code> (i.e. no sampler).</li><li><code>context</code>: the <code>Context</code> to use. Defaults to <code>DynamicPPL.DefaultContext()</code>.</li><li><code>θ</code>: the parameters to use. Defaults to <code>rand(Vector, model)</code>.</li><li><code>θ_linked</code>: the linked parameters to use. Defaults to <code>randn(d)</code> where <code>d</code> is the length of the linked parameters..</li><li><code>atol</code>: the absolute tolerance to use for comparisons.</li><li><code>rtol</code>: the relative tolerance to use for comparisons.</li></ul><p><strong>Notes</strong></p><ul><li>A separate "parameter" instance (<code>DynamicPPL.VarInfo</code>) will be created for <em>each test</em>. Hence if you have a particularly large model, you might want to only pass one <code>adbackend</code> at the time.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/TuringLang/Deprecated/blob/1cf7f84114cc36bd6c9202ebee19a61e1c3cb726/TuringBenchmarking/src/TuringBenchmarking.jl#L110-L142">source</a></section></details></article><article><details class="docstring" open="true"><summary id="TuringBenchmarking.stan_model_string"><a class="docstring-binding" href="#TuringBenchmarking.stan_model_string"><code>TuringBenchmarking.stan_model_string</code></a> — <span class="docstring-category">Function</span></summary><section><div><pre><code class="language-julia hljs">stan_model_string(model::DynamicPPL.Model)</code></pre><p>Return a string defining the Stan model corresponding to <code>model</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/TuringLang/Deprecated/blob/1cf7f84114cc36bd6c9202ebee19a61e1c3cb726/TuringBenchmarking/src/TuringBenchmarking.jl#L312-L316">source</a></section></details></article></article><nav class="docs-footer"><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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.17.0 on <span class="colophon-date" title="Wednesday 11 March 2026 10:36">Wednesday 11 March 2026</span>. Using Julia version 1.12.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> |
0 commit comments