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

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen 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:

https://bitbucket.org/eigen/eigen/src/848a9d1454c2ef056e376a48ec2422ae775e718e/Eigen/src/SparseCore/SparseDenseProduct.h?at=default&fileviewer=file-view-default#SparseDenseProduct.h-27

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:

https://bitbucket.org/eigen/eigen/src/848a9d1454c2ef056e376a48ec2422ae775e718e/Eigen/src/Core/products/Parallelizer.h

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!

gael

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?

Thanks
Julian Kent



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/