TuringLang / Turing.jl

Bayesian inference with probabilistic programming.
https://turinglang.org
MIT License
2k stars 216 forks source link

Tests to check that the correct AD method is actually used #2235

Open mhauru opened 1 month ago

mhauru commented 1 month ago

In #2221 I ran into a case where I wanted to write a test that checked if the ADType that the caller specified actually got used (e.g. to check that the argument isn't being accidentally ignored). Would be useful to have some utilities for this. See conversation in https://github.com/TuringLang/Turing.jl/pull/2221/files#r1608405934.