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.
BMI2 vs AVX2 (Stockfish versions)
Moderators: hgm, Rebel, chrisw
-
- Posts: 20
- Joined: Fri Sep 04, 2020 9:20 pm
- Full name: Assaf Patishi
-
- Posts: 288
- Joined: Sat Jun 30, 2018 10:58 pm
- Location: Ukraine
- Full name: Volodymyr Shcherbyna
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.
-
- Posts: 79
- Joined: Fri Mar 10, 2017 1:44 am
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: 447
- Joined: Mon Jun 07, 2010 3:13 am
- Location: Holland, MI
- Full name: Martin W
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
-
- Posts: 4889
- Joined: Thu Mar 09, 2006 6:34 am
- Location: Pen Argyl, Pennsylvania
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.
-
- Posts: 476
- Joined: Sun Mar 17, 2019 12:00 pm
- Full name: Henk Drost
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.
-
- Posts: 5228
- Joined: Thu Mar 09, 2006 9:40 am
- Full name: Vincent Lejeune
Re: BMI2 vs AVX2 (Stockfish versions)
Here are the instruction comparison between Zen 2 with Zen 3Raphexon wrote: ↑Thu Jan 07, 2021 8: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
-
- Posts: 20
- Joined: Fri Sep 04, 2020 9:20 pm
- Full name: Assaf Patishi
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: 12540
- Joined: Wed Mar 08, 2006 8:57 pm
- Location: Redmond, WA USA
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.