Ryzen 1800x and best stockfish version

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

syzygy
Posts: 5557
Joined: Tue Feb 28, 2012 11:56 pm

Re: Ryzen 1800x and best stockfish version

Post by syzygy »

syzygy wrote:
Cardoso wrote:On PDEP and PEXT instructions Skylake has one cycle latency.
Ryzen has 18 cycles !!!
Even then it is surprising (to me) that the bmi2 version is SO MUCH slower. (Does a bmi2 instruction flush the pipeline or something?)
Here I found the following measurements:
Image
So pdep/pext not only have huge latency, they are even worse for throughput. So they basically screw up efficiency.

Something else I read here:
Ryzen seems to have very bad performance on BSR/BSF (6 ops?) which is very weird because the essentially identical LZCNT/TZCNT seem OK (1 and 2 uops respectively).
I think compilers will generate the lzcnt/tzcnt instructions nowadays. But asmFish seems to use bsf instead of tzcnt.

That whole thread is interesting. It seems Ryzen is as good as or better than Intel in executing instructions, but that its memory subsystem is behind Intel's.
corres
Posts: 3657
Joined: Wed Nov 18, 2015 11:41 am
Location: hungary

Re: Ryzen 1800x and best stockfish version

Post by corres »

I have made some speed test on my Ryzen machine with Stockfish Speed Test made by Brice Allenbrand. For the good reproducibility I use one core tests only.
My PC is a Ryzen 7 1800x running on 8x4000 MHz and SMT (~HT) is OFF.
OS is Windows 7 64 bits.
Stockfish dev. used by me is 17062123.
Results:

Abrok-compiles:
x_64_modern 2156 Mnps
x_64 (old) 2155 Mnps
x_64_bmi2 1656 Mnps

Compiled by me on this PC with MinGW w64 gcc-5.3.0:
x_64_modern 2244 Mnps
x_64 (old) 2181 Mnps
x_64_bmi2 1694 Mnps
Deviations from average are < 5 Mnps.

Bmi2 versions are slower near 25% and it is obvious that Abrok compiles far from optimal.
Zenmastur
Posts: 919
Joined: Sat May 31, 2014 8:28 am

Re: Ryzen 1800x and best stockfish version

Post by Zenmastur »

corres wrote:I have made some speed test on my Ryzen machine with Stockfish Speed Test made by Brice Allenbrand. For the good reproducibility I use one core tests only.
My PC is a Ryzen 7 1800x running on 8x4000 MHz and SMT (~HT) is OFF.
OS is Windows 7 64 bits.
Stockfish dev. used by me is 17062123.
Results:

Abrok-compiles:
x_64_modern 2156 Mnps
x_64 (old) 2155 Mnps
x_64_bmi2 1656 Mnps

Compiled by me on this PC with MinGW w64 gcc-5.3.0:
x_64_modern 2244 Mnps
x_64 (old) 2181 Mnps
x_64_bmi2 1694 Mnps
Deviations from average are < 5 Mnps.

Bmi2 versions are slower near 25% and it is obvious that Abrok compiles far from optimal.

I assume that Mnps should actually be Knps and the standard deviation is 5Knps. Is that correct?

Regards,

Forrest
Only 2 defining forces have ever offered to die for you.....Jesus Christ and the American Soldier. One died for your soul, the other for your freedom.
corres
Posts: 3657
Joined: Wed Nov 18, 2015 11:41 am
Location: hungary

Re: Ryzen 1800x and best stockfish version

Post by corres »

Sorry, but I have not detailed information about Brice's speed tester and moreover the critical parts of it are in binaries. But I am afraid you are right and it is a bug in the results displayed by the tester. In any case the results - disregarding their dimension - are good numerically.
User avatar
Look
Posts: 364
Joined: Thu Jun 05, 2014 2:14 pm
Location: Iran
Full name: Mehdi Amini

Re: Ryzen 1800x and best stockfish version

Post by Look »

corres wrote:I have made some speed test on my Ryzen machine with Stockfish Speed Test made by Brice Allenbrand. For the good reproducibility I use one core tests only.
My PC is a Ryzen 7 1800x running on 8x4000 MHz and SMT (~HT) is OFF.
OS is Windows 7 64 bits.
Stockfish dev. used by me is 17062123.
Results:

Abrok-compiles:
x_64_modern 2156 Mnps
x_64 (old) 2155 Mnps
x_64_bmi2 1656 Mnps

Compiled by me on this PC with MinGW w64 gcc-5.3.0:
x_64_modern 2244 Mnps
x_64 (old) 2181 Mnps
x_64_bmi2 1694 Mnps
Deviations from average are < 5 Mnps.

Bmi2 versions are slower near 25% and it is obvious that Abrok compiles far from optimal.
Anybody tried Stockfish compiled and benched using Clang compiler?
Farewell.
david
Posts: 20
Joined: Sat Jan 16, 2016 7:25 pm

Re: Ryzen 1800x and best stockfish version

Post by david »

now with stockfish 9 from the stockfish downloads site Author: mstembera
Date: Wed Jan 31 11:41:09 2018 +0100 Timestamp: 1517395269

The three bench results are:
X64
Total time (ms) : 2705
Nodes searched : 5023629
Nodes/second : 1857164

Bmi2
Total time (ms) : 3510
Nodes searched : 5023629
Nodes/second : 1431233

Modern
Total time (ms) : 2693
Nodes searched : 5023629
Nodes/second : 1865439

So again, with a Ryzen 1800x, bmi2 is considerably slower. Modern is just a tad faster than x64.

david
User avatar
CMCanavessi
Posts: 1142
Joined: Thu Dec 28, 2017 4:06 pm
Location: Argentina

Re: Ryzen 1800x and best stockfish version

Post by CMCanavessi »

What is interesting is that some engines are more affected than others. For example stockfish bmi2 is clearly slower, but I tested Ginkgo and the bmi compile was 2-3% faster.
Another case is Orion, where bmi binary is faster.

Maybe they are not using the instruction to their fullest, and that's why the penalty is non-existant.

Edit:

Ginkgo test

Code: Select all

BMI binary&#58; info nodes 436765732 nps 1169736 hashfull 684 time 373388
Non-BMI&#58;    info nodes 436765732 nps 1147429 hashfull 684 time 380647
Paloma
Posts: 1167
Joined: Thu Dec 25, 2008 9:07 pm
Full name: Herbert L

Re: Ryzen 1800x and best stockfish version

Post by Paloma »

Note, the bench results fluctuate with every run.

Run benchmark 10 times and you get 10 different results, unfortunately