Skip to content

Commit ba4f30e

Browse files
committed
use USE_THREADSAFE_EVAL in fasteval
1 parent 00886ec commit ba4f30e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/fasteval.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ function (f::FastLogDensityAt)(params::AbstractVector{<:Real})
375375
# TODO(penelopeysm): This should _not_ check Threads.nthreads(). I still don't know what
376376
# it _should_ do, but this is wrong regardless.
377377
# https://github.com/TuringLang/DynamicPPL.jl/issues/1086
378-
vi = if Threads.nthreads() > 1
378+
vi = if DynamicPPL.USE_THREADSAFE_EVAL[]
379379
accs = map(
380380
acc -> DynamicPPL.convert_eltype(float_type_with_fallback(eltype(params)), acc),
381381
accs,

0 commit comments

Comments
 (0)