Open maxitg opened 4 years ago
Any progress here? GPU support seems like a must have
@justinjdickow, there is some progress in CPP_Multithread_Rules, which is WIP, but that only works for multi-rule case. This issue is going to be for CPU parallelization specifically, the issue for GPUs is #353.
The problem
Currently,
WolframModel
and related functions are always running sequentially.While it might be tricky to parallelize the symbolic code, it should be reasonably straightforward to parallelize the C++ code.
This issue specifically is for CPU parallelization for a specific "EventOrderingFunction", i.e., it should not change the output of
WolframModel
in any way. There is another issue (TODO: add issue) for parallelizing undefined-order evolution. There are also separate issues for GPU (TODO: add issue) and distributed (TODO: add issue) implementations.Possible solution
As a first step, one can consider doing sub-event parallelization, i.e., indexing the last event outputs in multiple threads.
Additional context
Alternatively, for some
"EventOrderingFunction"
s one can pre-evaluate multiple matches at once, keep a queue of finished evaluations (including post-event indexing), and have a master process which would apply matches from that queue in the order specified by the ordering function (and discarding ones that happen to overlap). This might potentially waste computation, but will allow for much better parallelization in some systems. These two approaches could be combined, as they would work best for different kinds of systems.Subtasks