Skip to content

Commit b847542

Browse files
committed
Simplify benchmark suite code
1 parent 70ff1a9 commit b847542

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

benchmarks/src/DynamicPPLBenchmarks.jl

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -86,18 +86,9 @@ function make_suite(model, varinfo_choice::Symbol, adbackend::Symbol, islinked::
8686
vi = DynamicPPL.link(vi, model)
8787
end
8888

89-
# We construct `LogDensityFunction` using different values
90-
# than the ones we're going to use for the test. Some of the AD backends
91-
# compile the tape upon `LogDensityFunction` construction, and we want to
92-
# evaluate using inputs different from those that the tape was compiled for.
9389
f = DynamicPPL.LogDensityFunction(model, vi, context; adtype=adbackend)
94-
9590
# The parameters at which we evaluate f.
96-
θ = if islinked
97-
randn(length(vi[:]))
98-
else
99-
rand(Vector, model)
100-
end
91+
θ = vi[:]
10192

10293
# Run once to trigger compilation.
10394
LogDensityProblems.logdensity_and_gradient(f, θ)

0 commit comments

Comments
 (0)