BMI2 vs AVX2 (Stockfish versions)
Moderators: hgm, Dann Corbit, Harvey Williamson
Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
BMI2 vs AVX2 (Stockfish versions)
Hi everybody,
Is there a difference between the two? Is one instruction set faster than the other?
My CPU (10900k) supports both of them.
Thx.
Is there a difference between the two? Is one instruction set faster than the other?
My CPU (10900k) supports both of them.
Thx.
-
- Posts: 186
- Joined: Sat Jun 30, 2018 8:58 pm
- Location: Ukraine
- Full name: Volodymyr Shcherbyna
- Contact:
Re: BMI2 vs AVX2 (Stockfish versions)
Best way is to run stockfish bench on each of the provided exe and then choose the one with the fastest NPS.
Re: BMI2 vs AVX2 (Stockfish versions)
Yup. Configure your GUI to display NPS and run both executables on a given position.
You might also try some of the SF Dev compiles at https://abrok.eu/stockfish/ There has been a fair bit of code optimization since SF-12 was released.
You might also try some of the SF Dev compiles at https://abrok.eu/stockfish/ There has been a fair bit of code optimization since SF-12 was released.
-
- Posts: 329
- Joined: Mon Jun 07, 2010 1:13 am
- Location: Holland, Michigan
- Full name: Martin Wyngaarden
Re: BMI2 vs AVX2 (Stockfish versions)
I have a an i7-9750H and the AVX2 compile is approximately 3% slower for this CPU, after testing by running the benchmark 30+ times for each compile and comparing the medians and minimums using bench, with a depth of 18+. Maybe more samples are needed, but in any case, the difference is negligible in my case and seems to favor BMI2.
Edit: This was using recent dev builds from the past two week from abrok.eu
Re: BMI2 vs AVX2 (Stockfish versions)
Generally speaking, Intel processors that support bmi2 are faster with BMI2. Current AMD processors support bmi2, but are generally faster with AVX2.
YMMV, usually not too hard to decipher, if it is hard to decipher, it is probably not that important.
Re: BMI2 vs AVX2 (Stockfish versions)
Current (Zen3) AMD should be faster with BMI2 now that that PEXT is no longer microcoded.
Zen1/2 had microcoded PEXT which meant that what took 1 cycle for a modern Intel CPU took multiple for Zen.
Re: BMI2 vs AVX2 (Stockfish versions)
Here are the instruction comparison between Zen 2 with Zen 3Raphexon wrote: ↑Thu Jan 07, 2021 7:50 amCurrent (Zen3) AMD should be faster with BMI2 now that that PEXT is no longer microcoded.
Zen1/2 had microcoded PEXT which meant that what took 1 cycle for a modern Intel CPU took multiple for Zen.
https://www.anandtech.com/show/16214/am ... x-tested/6
Code: Select all
Zen2 Zen 3
PDEP/PEXT 300 cycle latency 3 cycle latency
250 cycles per 1 1 per clock
Re: BMI2 vs AVX2 (Stockfish versions)
Interesting replies guys, thx.
I personally use Dragon (formerly: Komodo) and it actually comes only with AVX2 version (despite Komodo 14 came with both), I wonder why.
I personally use Dragon (formerly: Komodo) and it actually comes only with AVX2 version (despite Komodo 14 came with both), I wonder why.
-
- Posts: 12018
- Joined: Wed Mar 08, 2006 7:57 pm
- Location: Redmond, WA USA
- Contact:
Re: BMI2 vs AVX2 (Stockfish versions)
Probably testing.
If I have 4 binaries produced, it takes four times as long to test as if I have 1.
So the count of executables produced will be a function of hardware and time needed to complete the testing cycle.
Where I work, we support a huge number of targets.
We have a large server room packed with servers with many hundreds of virtual machines.
It takes two weeks to complete one test cycle.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.