Re: [eigen] Performance difference icc <-> gcc, EIGEN_STRONG_INLINE

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


I've been too fast, the previous link is an attempt to reproduce the issue, but I did not managed.

Just to check, which version of Eigen are you using?

Another possible explanation could be that __forceinline mades some function too big and then ICC stoped inlining even trivial functions... The complete ASM files would help to verify this hypothesis.



On Fri, Mar 15, 2019 at 10:57 PM Gael Guennebaud <gael.guennebaud@xxxxxxxxx> wrote:
And the self-contained example reproducing the issue:

https://godbolt.org/z/e8i3S0

On Fri, Mar 15, 2019 at 10:56 PM Gael Guennebaud <gael.guennebaud@xxxxxxxxx> wrote:
Thank you for the asm. Now I remember that ICC does no respect __forceinline if put at definition, unlike the standard inline keyword.  On the other hand, MSVC requires forceinline at definition. So we need to duplicate them at both definition and declaration. Sadly I cannot think about a way to automatically detect such mismatch... and there are 2543 occurrences to check :(

On Fri, Mar 15, 2019 at 9:16 AM Michael Riesch <michael.riesch@xxxxxx> wrote:

Hello Christoph and Gael,

I tried to extract the relevant assembly and attached it. In the file eigen_forceinline.txt is the critical part generated by default, the file eigen_inline.txt is the same but with EIGEN_STRONG_INLINE set to "inline". The compiler options are in both cases -O3 -g -DNDEBUG -fPIC   -xHost -qopenmp -std=gnu++11

Thanks and regards,
Michael

PS.:


> I think "Science" is the best fit, since mbsolve [1] "is an open-source
> solver tool for the Maxwell-Bloch equations, which are used to model
> light-matter interaction in nonlinear optics."

Done!
Thank you :-)



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