-
Notifications
You must be signed in to change notification settings - Fork 26
Description
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).