Summary: | Add support for AVX512 to Eigen | ||
---|---|---|---|
Product: | Eigen | Reporter: | Benoit Steiner <benoit.steiner.goog> |
Component: | Core - vectorization | Assignee: | Benoit Steiner <benoit.steiner.goog> |
Status: | RESOLVED FIXED | ||
Severity: | Unknown | CC: | chtz, gael.guennebaud, jacob.benoit.1, markos |
Priority: | Normal | ||
Version: | 3.4 (development) | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Bug Depends on: | |||
Bug Blocks: | 814 |
Description
Benoit Steiner
2016-09-23 21:59:35 UTC
Great. You said "most of the required additions are already available", do you remember what's missing? I did not looked thoroughly, but have a few comments: - predux_half -> I would rename it to predux_half_downto4 - Eigen/src/Core/arch/AVX512/CMakeLists.txt can be removed - regarding the conflit in Eigen/src/Core/products/GeneralBlockPanelKernel.h, we should keep the actual version and discard the version of the clone. I guess it's really time to merge the implementations of plog, pexp, and the likes...! (In reply to Gael Guennebaud from comment #1) > I guess it's really time to merge the implementations of plog, pexp, and the > likes...! I agree. I would strongly prefer not to copy MathFunctions.h again for this. I made a proof-of-concept implementation for meta packets once (Bug 692 comment 10), unfortunatelety I never got back to it. I don't think we need meta-packet for math-functions, for instance I've already made a generic implementation of tanh that works for float and any Packet?f type: https://bitbucket.org/eigen/eigen/src/f6382682565c946d46612fe0e36e486bba1371ce/Eigen/src/Core/MathFunctionsImpl.h?at=default&fileviewer=file-view-default (In reply to Gael Guennebaud from comment #3) > I don't think we need meta-packet for math-functions, [...] Yes, I agree we don't need them as long as no conversions to int and back to float/double are required. Otherwise, it gets complicated, especially for AVX vs AVX2 (where only the latter support 256 bit integer operations). We might get away with some bit-twiddling in some cases, though (e.g., adding float(1<<23) to round to the next integer). > You said "most of the required additions are already available", do you > remember what's missing? From the top of my mind (I haven't touched the code in a while), we still need to implement pblend to be feature complete. I also remember that some of the math functions aren't implemented, but then this might not be an issue if we merge the implementations of plog, pexp, and friends. > I did not looked thoroughly, but have a few comments: > > - predux_half -> I would rename it to predux_half_downto4 > - Eigen/src/Core/arch/AVX512/CMakeLists.txt can be removed > - regarding the conflit in > Eigen/src/Core/products/GeneralBlockPanelKernel.h, we should keep the actual > version and discard the version of the clone. These are good suggestions. I'll sync the avx512 branch with the latest version of the Eigen codebase and start working on this as soon as the 3.3 release is out. The code is now merged but turned off by default (https://bitbucket.org/eigen/eigen/pull-requests/235/added-support-for-avx512-to-eigen/diff#comment-None). Once we have more experience with it, we should turn it on by default provided that the compile flags allow the use of AVX512 instructions. AVX512 is operational for a while. Support for AVX512 is now on par with SSE/AVX, including complexes. -- GitLab Migration Automatic Message -- This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/1306. |