-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop disabling AVX-512 in march=native
compiler flag setup
#843
Comments
do we have any data saying that |
On my setup just now, a quick test on an i7-8550U running 64-bit Debian, the total time from running five
Where that was built with:
Both with and without, from
Ran in:
With
Without it. It's say an 11% performance increase (or, alternatively, a 13% performance decrease were it removed) is worth a compile flag and a few lines in Furthermore, this is on x86-64, whic is already reasonably friendly to 64-bit math in its baseline configuration. 32-bit x86 definitely is not, so I'd expect a bigger performance delta there. |
I'm surprised by the benchmark:
i.e. I don't see how it helps our codebase which is scalar integer everywhere with very few bit manipulation. Case in point, in my own pure Nim crypto benchmark |
With the inclusion of BLST |
Useful information to summarize (in a less technical way) for system requirements, the distinction between platforms which need Milagro, those which use BLST without It looks like https://en.wikipedia.org/wiki/Intel_ADX ( Is BMI2-only ( |
BLST requires both or SSE3 (for SHA256) |
@sinkingsugar had issues with https://github.com/eth2-clients/multinet as the machine that cross-compiled the docker pre-build of NBC was AVX512 aware and so it didn't run on his machine (if I understood correctly). Also BLST will not require SSE3 soon: status-im/nim-blscurve#84 |
#1664 implements one approach to this. It means that the default Longer term, I think this issue still specifies the most correct action: More immediately, I'm not convinced AVX-512 is useful enough in terms of ((auto-vectorization utility)(fraction non-vectorized code)+(utility)(vectorized code) when available)*(availability) to require multinet to use its own compile settings. |
You need to have loop with 8x For our use-case this all those preconditions are only met for SHA256, and we happen to have no AVX512 enabled SHA256 code. |
Not necessarily AVX512. You can't compile with |
@stefantalpalaru is right. So I suggest to make a pick on a flavor that fits our targets ( when we release binaries ) |
I think we're fine for now and for Docker/cross-compile builds we have the #766 |
Not until at least May or June, and maybe later if some places (especially importantly, CI services/images) keep using gcc longer, so that more conservative distributions and other gcc distributors can catch up, but https://github.com/status-im/nim-beacon-chain/blob/daabb1b5b29065f502ae24c91b9ca231aad58446/config.nims#L30-L33
should be removed since the bug was marked
RESOLVED FIXED
on 2020-02-14 and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65782#c11 states:Presumably meaning gcc 9.x as well as 10.x.
There's no great gain in automatic compiler AVX512 per se for Nimbus, just simpler build configuration with fewer things to explain/understand, so the extent this breaks anything or represents more than negligible risk, it should not be changed.
The text was updated successfully, but these errors were encountered: