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

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]

*To*: eigen <eigen@xxxxxxxxxxxxxxxxxxx>*Subject*: Re: [eigen] Parallel .solve(B) for B.cols() > 1*From*: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>*Date*: Wed, 4 Jan 2017 17:21:56 +0100*Dkim-signature*: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=tT3xzNpku2ebpZ5DlGSFHp+mOvL93sUwXf/dnOpIWsY=; b=XjlKIKnT4eMNZ0myioou0I4VJdp+mbS8R5qm6Or0fBeXpx5SG5NptGMcMndiYqBXSi 1NS21f4YgTBFHwXGe0nRz2CoQKPrytIH4oKw3GRdzuVBasvv7xbUBoirjvEyCQmKZ/91 d5T+qVDncwthPJcmjJsFSvd2sKWvCgW7takDkbFhxTCH8nqIPxrMjOtut+3t8MXiOLJi XMezG8m5GeEKaQYPBnGfkBHoCceDAhsDkOdUHpwhN2GpXpvlBTNM8AwTiJTfP1N5iG/o QHi6l17MoIOB6P9ci+xkKKwYlggN6J5N/8DDs83Xv5kHZDKVSo+3vXKNoQyY295FJTqI +42A==

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!

gael

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

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?Using CompleteOrthogonalDecompositioHi allIs there a reason that Eigen doesn't do a parallel x = decomposition.solve(B) by splitting B into column-wise chunks?n 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 ThanksJulian Kent

**References**:**[eigen] Parallel .solve(B) for B.cols() > 1***From:*Julian Kent

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] On a flexible API for submatrices, slicing, indexing, masking, etc.** - Next by Date:
**Re: [eigen] On a flexible API for submatrices, slicing, indexing, masking, etc.** - Previous by thread:
**[eigen] Parallel .solve(B) for B.cols() > 1** - Next by thread:
**[eigen] ftbfs basicstuff_4 test with visual studio 10**

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