Skip to content

Commit

Permalink
Allow multi-threading the likelihood if only one chain is used
Browse files Browse the repository at this point in the history
  • Loading branch information
sefffal committed Nov 2, 2024
1 parent a598e09 commit 895686e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/OctofitterPigeonsExt/OctofitterPigeonsExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Base.@nospecializeinfer function Octofitter.octofit_pigeons(
@nospecialize

# Turn off likelihood parallelism if we are sampling one chain per thread
if multithreaded
if multithreaded && n_chains + n_chains_variational > 1
Octofitter._kepsolve_use_threads[] = false
# Turn on likelihood parallelism if we have ~15x more data than threads.
# This is based on some local benchmarks. Spawning tasks takes about 450ns;
Expand Down

0 comments on commit 895686e

Please sign in to comment.