Skip to content

Commit a78f433

Browse files
ChrisRackauckas-ClaudeChrisRackauckasclaude
authored
Add the TuringLang/ADTests AD benchmark suite (#1624)
* AutomaticDifferentiationTuring: port the TuringLang/ADTests AD benchmark Adds benchmarks/AutomaticDifferentiationTuring, a port of https://github.com/TuringLang/ADTests (results published at https://turinglang.org/ADTests/) into the SciMLBenchmarks suite. The benchmark differentiates the log density of 62 Turing.jl models with all 8 AD backends Turing supports, checking each gradient against FiniteDifferences and reporting the gradient/primal time ratio. The models cover base Julia control flow and threading, the corners of the @model DSL, individual distributions, the DynamicPPL arXiv paper models, PosteriorDB posteriors, and models calling into OrdinaryDiffEq, DelayDiffEq, Lux, and AbstractGPs, so it exercises far more of the Julia language than the existing AD benchmarks do. Each model is benchmarked in its own worker process. Enzyme can segfault on some of these models, and a crash must not lose the results already collected, so the parent restarts the worker with the backends that have not run yet and records the offending one as a crash. This lives in its own folder rather than in AutomaticDifferentiation because the Turing stack pins DynamicPPL/Turing tightly enough that sharing a Manifest with the existing AD benchmarks risks constraining them. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X8qBZzvd4yxfDYs7v8WDqE * Flush stderr after each progress message Julia buffers stderr when it is a file, while the worker subprocesses write to the inherited descriptor directly, so the progress log arrived hours after the worker output it was meant to label. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X8qBZzvd4yxfDYs7v8WDqE * Show AD cost against model dimension instead of a coverage bar chart The coverage bars were all between 55 and 62 out of 62, so the chart carried no information the status table did not already give. Replace it with relative gradient time against model dimension, which shows the forward/reverse crossover directly. Also widen the heatmap margin so the longer model names are not clipped. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X8qBZzvd4yxfDYs7v8WDqE * Seed the global RNG before loading each model Several models synthesise their data at load time from the global RNG. Two independent full runs disagreed on six status cells because of it: control_flow took a different branch, so ReverseDiffCompiled's tape was wrong in one run and right in the other, and dppl_hmm_semisup drew state sequences that different backends could and could not handle. Upstream ADTests leaves this unseeded. For a benchmark whose output is published and compared across versions, a status that flips run to run is worse than useless, so seed it. Verified by running control_flow and dppl_hmm_semisup twice each: identical statuses across runs. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X8qBZzvd4yxfDYs7v8WDqE --------- Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 8cb51bd commit a78f433

71 files changed

Lines changed: 9153 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ updates:
1414
- "/benchmarks/AstroChem"
1515
- "/benchmarks/AutomaticDifferentiation"
1616
- "/benchmarks/AutomaticDifferentiationSparse"
17+
- "/benchmarks/AutomaticDifferentiationTuring"
1718
- "/benchmarks/BayesianInference"
1819
- "/benchmarks/Bio"
1920
- "/benchmarks/ComplicatedPDE"

0 commit comments

Comments
 (0)