Re: [eigen] Parallel .solve(B) for B.cols() > 1

[ Thread Index | Date Index | More Archives ]

Indeed, that's a rather simple approach, but your experiment shows it's worth the minor effort. Since all matrix decompositions follows the same API, this can probably be implemented only once for all in Solve.h with compile-time checks on the number of columns to completely remove omp code for vectors. Patch welcome! You can see a usage of omp in Eigen there:

Here, we have to be a bit more careful because Eigen might attempt to parallelize nested matrix-matrix operations, so we need to make sure that it does not. This currently happens there:

I'm not omp-expert enough to provide good advice on this matter, but as this must be a classical omp issue, there must be classical solutions too!


On Wed, Jan 4, 2017 at 10:23 AM, Julian Kent <julian.kent@xxxxxxxxx> wrote:
Hi all

Is there a reason that Eigen doesn't do a parallel x = decomposition.solve(B) by splitting B into column-wise chunks?

Using CompleteOrthogonalDecomposition and solving for B=Identity (to solve pinv) I'm getting a 5.5x speedup on a 6-core CPU, for matrix size 4000 x 4000

Is it just considered a simple enough problem that it isn't necessary to have it done automatically, is this something that was overlooked, or am I missing something here?

Julian Kent

Mail converted by MHonArc 2.6.19+