Can somebody compare the AMD Ryzen processors to the intel processors

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

Moderators: hgm, Rebel, chrisw

Carlos777
Posts: 1728
Joined: Sun Dec 13, 2009 6:09 pm

Re: Can somebody compare the AMD Ryzen processors to the intel processors

Post by Carlos777 »

elpapa wrote: Fri Mar 26, 2021 9:15 pm
Carlos777 wrote: Fri Mar 26, 2021 7:55 pm Nice result. I am thinking about getting a 3700x, but I don't want to OC it. How would it do it without OC?
At that frequency, do you need a special cooling system for the CPU?
It's not really an overclock as I see it, more like a constant frequency which I prefer. The CPU is stable at 1.225V so it doesn't need any special cooling, but the stock cooler made some noise under heavy load. I bought an Arctic Freezer eSports Duo and changed the fan curves and now I can't hear the fans at all.

I can run the same sf benches later with stock settings if you want, but I think it's about 10% faster with current settings, including memory OC.
I'd appreciate it if you could do it.

Also, could you test this benchmark?

http://computerchess.org.uk/engines/Cra ... 7%20BH.zip

How to test: Reboot a machine (not required but preferrable), extract Crafty executable into a separate folder, make sure there are no other files in that folder, run crafty, type 'bench' <enter>, wait a while (don't use computer in that time), when the benchmark ends type 'quit' <enter> (to quit the Crafty). You will then see a new file "log.001" in the Crafty folder. Open that file and find a line "Total elapsed time: 96" near the end. (Your time may be different of course).

Thank you in advance.
User avatar
lithander
Posts: 880
Joined: Sun Dec 27, 2020 2:40 am
Location: Bremen, Germany
Full name: Thomas Jahn

Re: Can somebody compare the AMD Ryzen processors to the intel processors

Post by lithander »

I can confirm the ~90% ratio on a Ryzen 3600, manual overclock @4200 MHz:

1 thread, go movetime 30000
nnue off: 1,685,797 nps
nnue on: 1,570,265 nps (93%)

Code: Select all

sf 13 avx2

Stockfish 13 by the Stockfish developers (see AUTHORS file)
setoption name Hash value 2048
go movetime 30000
info depth 32 seldepth 41 multipv 1 score cp 27 nodes 47109547 [b]nps 1570265[/b] hashfull 179 tbhits 0 time 30001 pv e2e4 e7e5 g1f3 b8c6 f1b5 a7a6 b5a4 g8f6 e1g1 f6e4 d2d4 b7b5 a4b3 d7d5 d4e5 c8e6 c2c3 f8c5 d1d3 e8g8 c1e3 c6e7 b1d2 c5e3 d3e3 e4d2 e3d2 h7h6 a1d1 c7c5 h2h3 a8c8 b3c2 e7g6 f1e1 f8e8
bestmove e2e4 ponder e7e5

setoption name Hash value 2048
setoption name Use NNUE value false
go movetime 30000
info depth 29 seldepth 32 multipv 1 score cp 62 nodes 50575604 [b]nps 1685797[/b] hashfull 205 tbhits 0 time 30001 pv d2d4 d7d5
bestmove d2d4 ponder d7d5
Minimal Chess (simple, open source, C#) - Youtube & Github
Leorik (competitive, in active development, C#) - Github & Lichess
User avatar
pohl4711
Posts: 2433
Joined: Sat Sep 03, 2011 7:25 am
Location: Berlin, Germany
Full name: Stefan Pohl

Re: Can somebody compare the AMD Ryzen processors to the intel processors

Post by pohl4711 »

MMarco wrote: Fri Mar 26, 2021 9:12 pm
Seriously?

You're the only one here with a ratio far above 100% amongs a few users with an AMD processor. MikeB got 92%. I get 91%, Elpapa 90%, Modern Times 94%. You get 131% and you think that perhaps other's results are wrong?
I measured the right thing (to show, why the Ipman speed measurements with a non nnue-engine (asmFish) are outdated), but I wrote nonsense:

What I measured (and what has to be measured) was the speed gain from popcount binary to bmi2/avx2 binary. Not comparing avx2-speed of nnue on/off (that makes no sense at all). Sorry for that.

So, here is the real point, the speedups from popcount to bmi2/avx2:

Intel Haswell:
nnue off:
popcount -> bmi2 : +4.3%

nnue on:
popcount -> bmi2 : +22%


AMD Ryzen 3900:
nnue off:
popcount -> avx2 : +0.9%

nnue on:
popcount -> avx2 : +30%


So, nnue engines run measureable faster on AMD Ryzen/Threadripper, when the CPU is on a corresponding GHz-speed level than a Intel CPU, but slower, if the engine uses no nnue. Because the speedup from the base version (popcount) to the CPU-type optimized version (bmi2 for Intel, avx2 for AMD) is higher for AMD/avx2, if nnue is on and higher for Intel/bmi2, if nnue is off.
And because of this (and the fact, that nnue-engines have taken over), the Ipman-speed measurements using old asmFish are outdated.
jpqy
Posts: 550
Joined: Thu Apr 24, 2008 9:31 am
Location: Belgium

Re: Can somebody compare the AMD Ryzen processors to the intel processors

Post by jpqy »

Is wrong,he is updated with last cpu's!
No matter which tool you use,you need same tool to get a list and have a compare.

Each new generation cpu's get newer instructions ,so you can say why he don't use AVX512 for these new Intel cpu's ,it's clearly faster then BMI2
For each cpu you can always get or compile a faster one..that's not the point what Ipman is showing.

It's a great list ,people get a idea how fast these cpu's are when planning to buy a new system..it helps me to decide what will be my next system.
And for sure not outdated?,he even get benches just after NDA is lifted from new released cpu's!

NNUE is new ,i propose create a list with all new cpu benches ,i will look forward how many years it will take you to create one ;)
And look out after a few years there will be people who will tell you ,you are outdated :)
Carlos777
Posts: 1728
Joined: Sun Dec 13, 2009 6:09 pm

Re: Can somebody compare the AMD Ryzen processors to the intel processors

Post by Carlos777 »

pohl4711 wrote: Sat Mar 27, 2021 7:21 am What I measured (and what has to be measured) was the speed gain from popcount binary to bmi2/avx2 binary. Not comparing avx2-speed of nnue on/off (that makes no sense at all). Sorry for that.
Agreed, it makes sense.
pohl4711 wrote: Sat Mar 27, 2021 7:21 am So, here is the real point, the speedups from popcount to bmi2/avx2:

Intel Haswell:
nnue off:
popcount -> bmi2 : +4.3%

nnue on:
popcount -> bmi2 : +22%


AMD Ryzen 3900:
nnue off:
popcount -> avx2 : +0.9%

nnue on:
popcount -> avx2 : +30%
Interesting results, I'll get a Ryzen, but are these values right?

Code: Select all

AMD Ryzen 9 3900 (avx2 binary):

SF nnue off: 1399478 nps
SF nnue on: 1830004 nps
Gian-Carlo Pascutto
Posts: 1243
Joined: Sat Dec 13, 2008 7:00 pm

Re: Can somebody compare the AMD Ryzen processors to the intel processors

Post by Gian-Carlo Pascutto »

Using the current git master I get something like 2.6Mnps on a 3900X.

I just got a 5800X (no luck getting 5900/5950) and it benches at 3.3Mnps, which is pretty astounding. The M1 benches at 2.4Mnps.
Gian-Carlo Pascutto
Posts: 1243
Joined: Sat Dec 13, 2008 7:00 pm

Re: Can somebody compare the AMD Ryzen processors to the intel processors

Post by Gian-Carlo Pascutto »

Test with Stockfish 13 release for easier comparison. Built-in bench.
https://github.com/official-stockfish/S ... -775835158

Code: Select all

AMD Ryzen 7 5800X, GCC 10.2, Stockfish 13 BMI2
Total time (ms) : 1140
Nodes searched  : 3766422
Nodes/second    : 3303878

AMD Ryzen 9 3900X, GCC 10.2, Stockfish 13 AVX2
Total time (ms) : 1465
Nodes searched  : 3766422
Nodes/second    : 2570936

AMD Ryzen 7 2700X, GCC 10.2, Stockfish 13 AVX2
Total time (ms) : 1888
Nodes searched  : 3766422
Nodes/second    : 1994926

Intel Xeon E3-1240 v3 (Haswell), GCC 10.2, Stockfish 13 AVX2
Total time (ms) : 1838
Nodes searched  : 3766422
Nodes/second    : 2049195

Intel i7-3770K, GCC 10.2, Stockfish 13 Modern
Total time (ms) : 2114
Nodes searched  : 3766422
Nodes/second    : 1781656
MMarco
Posts: 195
Joined: Sun Apr 12, 2020 1:09 am
Full name: Marc-O Moisan-Plante

Re: Can somebody compare the AMD Ryzen processors to the intel processors

Post by MMarco »

pohl4711 wrote: Sat Mar 27, 2021 7:21 am
MMarco wrote: Fri Mar 26, 2021 9:12 pm
Seriously?

You're the only one here with a ratio far above 100% amongs a few users with an AMD processor. MikeB got 92%. I get 91%, Elpapa 90%, Modern Times 94%. You get 131% and you think that perhaps other's results are wrong?
What I measured (and what has to be measured) was the speed gain from popcount binary to bmi2/avx2 binary. I measured the right thing (to show, why the Ipman speed measurements with a non nnue-engine (asmFish) are outdated), but I wrote nonsense:
Popcnt compiles weren't even mentionned then. Without doubt, you measured NNUE=ON vs NNUE=OFF with the latest Stockfish from Abrok, at least for bmi2:
pohl4711 wrote:
All with latest Stockfish from abrok (March, 24), go depth 28

Intel Haswell i7-6700HQ (bmi2 binary):

SF nnue off: 1071209 nps
SF nnue on: 932672 nps
= using nnue is 87% speed compared to nnue off
I specifically told you I got the same ratio with my intel processor:
MMarco wrote: With a 10700, NNUE gets 88% of classical's speed here:
All these numbers we shared came out to measure what you mentionned:
Pohl wrote:The nnue-engines run much faster on AMD Ryzen/Threadripper with an avx2-compile (+25%-30% more nodes!) compared to all Intel CPUs. So, for nnue-engines the Intel CPUs are much worse than they appear in that list.
So to check that your assertion that "avx-2-compiles for AMD generates 25-30% more nodes for NNUE compared to Intel CPU for NNUE engines" was correct, we compared the ratio NNUE=ON/NNUE=OFF for both AMD and Intel. Which makes a lot of sense.

As we saw, for Intel cpu, you and I got the same 87-88% ratio. For AMD, this ratio goes from 90-94% according to the numbers shown here. It seems that avx2 implementation on AMD processors is slightly superior to that of Intel (avx2 instructions are included in bmi2 compiles). But nowhere near your stated 25-30%. That is plain wrong.

What currently makes AMD processors so much better than Intel one at chess now, is just that they are faster processors with or without avx2 instructions (I'm not a hardware specialist, but I think it related to the number of instructions per cycle).

Compare a 9900k (that should be close to a 10700k) to a 5800x here with NNUE=ON with official Stockfish 12: https://openbenchmarking.org/test/pts/s ... f5#metrics

Code: Select all

9900k  = 17.73 knps (16 threads)
3800xt = 21.49 knps (16 threads), +21.2% vs 9900k
5800x  = 24.31 knps (16 threads), +37.0% vs 9900k
The better avx2 implementation (which gives a relative 5% edge) counts for at most 25% of the difference for Ryzen 3000 and less than 15% of the difference for Ryzen 5000.

This was done comparing avx2/bmi2 with NNUE=OFF and avx2/bmi2 with NNUE=ON. I don't get why you want to compare the increase from popcnt to bmi2 for NNUE=ON. Intel's bmi2 instructions have been there since 2013 (https://en.wikipedia.org/wiki/Haswell_( ... hitecture)), and NNUE came to computer chess not even a year ago. There never been popcnt compiles for NNUE that made sense to use with an Intel CPU. That is a counter factual reality and a useless comparison, and it doesn't yield your claimed +25-30% either.

Even Ipman's list that you claim being "outdated" doesn't use popcnt for intel! But you suggests worst, going back to popcnt for intel and being even more outdated! That is laughable.

Ipman uses bmi2 as the instructions were available when he tested the CPUs, and that is where we should start from.

IPMAN's list remains very useful to compare processors within the same family, to compare processors for non avx2 load, and given that you add an extra pourcentage on performance for nnue, it will give you a list of relative performance for NNUE engines. And he was a wide variety of processors listed including high count ones. Not bad, and certainly more reliable than your bogus numbers.
User avatar
pohl4711
Posts: 2433
Joined: Sat Sep 03, 2011 7:25 am
Location: Berlin, Germany
Full name: Stefan Pohl

Re: Can somebody compare the AMD Ryzen processors to the intel processors

Post by pohl4711 »

jpqy wrote: Sat Mar 27, 2021 10:01 am Is wrong,he is updated with last cpu's!

NNUE is new ,i propose create a list with all new cpu benches ,i will look forward how many years it will take you to create one ;)
And look out after a few years there will be people who will tell you ,you are outdated
I never doubted, that the list is updated with the latest cpus.

The point is, that nnue engines get more accelerated by avx2 on AMD than with bmi2 on Intel (thats why, I compare bmi2/avx2 with the popcount binanries).
Of course, it is a problem, to rebuilt a huge speed-test list with cpu-benches. But the effort should not be that high, because many older cpus do not need to be retested, because only newer cpus are really important for potential buyers of new hardware, I guess?!?
Jouni
Posts: 3281
Joined: Wed Mar 08, 2006 8:15 pm

Re: Can somebody compare the AMD Ryzen processors to the intel processors

Post by Jouni »

Are benches here with large pages? 10% speed-up for free with Intel. But I am not sure about AMD.
Jouni