-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parallelize belief propagation #145
Comments
Forget all of this, the overhead is insane |
Your proposal is useful when the distributions are very large (i.e. large NC and nexec), but have a large overhead otherwise. Further, while it works well for distribution multiplications, the bottleneck is typically in other operations (distribution multiplications are Outer parallelism will probably be easier, because it tends to work with larger chunks of work, hence lower overheads, and also to not be too terrible for cache usage efficiency. It's still not trivial to never regress performance (in particular for small nc and nexec). |
We should exploit parallelism in belief propagation.
(Copied from a discussion on matrix.)
Trying to parallelize a single belief propagation (i.e., multiple calls on the same BPState) with ContextExecutor will not work (I think it will end up executing serially due to a mutex).
BP parallelization is a tricky topic to implement well (we've had it in the past, with mixed results: it was performing very well in some cases, but badly in others - depending on parameters such as NC, nexec and the graph size), hence I didn't bother with it when I re-implemented the whole thing, but it would be nice to add it back. As a conservative starting point, we could try to parallelize factors and variables (using rayon's parallel iterators in propagate_loopy_step and propagate_all_vars).
The text was updated successfully, but these errors were encountered: