Zen 4 will be huge!

Discussion of chess software programming and technical issues.

Moderator: Ras

Joost Buijs
Posts: 1632
Joined: Thu Jul 16, 2009 10:47 am
Location: Almere, The Netherlands

Re: Zen 4 will be huge!

Post by Joost Buijs »

chrisw wrote: Wed Aug 31, 2022 4:52 pm
Joost Buijs wrote: Tue Aug 30, 2022 12:11 pm
dangi12012 wrote: Tue Aug 30, 2022 11:44 am A quick glance into the details of Zen4:
https://en.wikichip.org/wiki/amd/microa ... ures/zen_4

unveils that the Galois Field Instructions are available.
This means that in the future you can matrix multiply a Bitboard with another Bitboard!
Binary Matrix multiplication is infinitely more useful than any instruction we got in computerchess so far.


Among other things this means that the extended Hyperbola Qsc. Algorithm will be solvable in 4 rays at once (4x64bit Bitrotation)
And staying in 256 Instrinsics code the whole time!

Code: Select all

return ((o - bit) ^ bit_reverse(bit_reverse(o) - bit_rev)) & mask;
https://github.com/Gigantua/Chess_Moveg ... tation.hpp
Because bit reversal of 64 bits can be done with binary 64bit matrix multiplication.

So reverse bits, directly calculatingthe moveset etc. should all be possible to implement with the Galois Field instruction set.

Also AVX512 BF16 is more versatile than just using just AVX2.
All in all a very interesting step in the right direction
I wonder if it is as good as you think it is. The AVX-512 data path is only 256 bits, and AMD has the habit of implementing complex instructions in microcode. Just 2 memory channels seem a bit meager too.

I decided not to buy one, and to wait for either the Zen4 Threadripper (Pro) or the new Intel SPR Xeon.
NightmareX vs ChessSystemTalX on 96 cores each in 2022
Yes, that would be nice. I'm afraid that the 96 core will cost me an arm and a leg. Over here in the Netherlands they sell the 64 core Threadripper Pro 5995WX for 7500 euros incl. VAT. The new 96 core will cost even more.
Modern Times
Posts: 3704
Joined: Thu Jun 07, 2012 11:02 pm

Re: Zen 4 will be huge!

Post by Modern Times »

Joost Buijs wrote: Wed Aug 31, 2022 5:21 pm Yes, that would be nice. I'm afraid that the 96 core will cost me an arm and a leg. Over here in the Netherlands they sell the 64 core Threadripper Pro 5995WX for 7500 euros incl. VAT. The new 96 core will cost even more.
Yes, and I read something about above 64 threads Windows splits tasks into two processor groups that slows things down ? You'd probably be wanting to run Linux, which as a bonus save the cost of the windows licence.
dangi12012
Posts: 1062
Joined: Tue Apr 28, 2020 10:03 pm
Full name: Daniel Infuehr

Re: Zen 4 will be huge!

Post by dangi12012 »

Modern Times wrote: Wed Aug 31, 2022 8:41 pm
Joost Buijs wrote: Wed Aug 31, 2022 5:21 pm Yes, that would be nice. I'm afraid that the 96 core will cost me an arm and a leg. Over here in the Netherlands they sell the 64 core Threadripper Pro 5995WX for 7500 euros incl. VAT. The new 96 core will cost even more.
Yes, and I read something about above 64 threads Windows splits tasks into two processor groups that slows things down ? You'd probably be wanting to run Linux, which as a bonus save the cost of the windows licence.
Your information is outdated. See Windows 11 page:
https://docs.microsoft.com/en-us/window ... sor-groups

Operating system matters only slightly - what is the most important aspect for performance is comparing compilation with gcc, clang, msvc for your particular project. Clang-15 definitely is a powerhouse.
Worlds-fastest-Bitboard-Chess-Movegenerator
Daniel Inführ - Software Developer
Joost Buijs
Posts: 1632
Joined: Thu Jul 16, 2009 10:47 am
Location: Almere, The Netherlands

Re: Zen 4 will be huge!

Post by Joost Buijs »

Modern Times wrote: Wed Aug 31, 2022 8:41 pm
Joost Buijs wrote: Wed Aug 31, 2022 5:21 pm Yes, that would be nice. I'm afraid that the 96 core will cost me an arm and a leg. Over here in the Netherlands they sell the 64 core Threadripper Pro 5995WX for 7500 euros incl. VAT. The new 96 core will cost even more.
Yes, and I read something about above 64 threads Windows splits tasks into two processor groups that slows things down ? You'd probably be wanting to run Linux, which as a bonus save the cost of the windows licence.
When I buy something new it will be at max. with 24 or 32 cores, so Windows will suffice.

Having a lot of cores can be useful for testing, it is probably cheaper to buy a few 'small' machines instead of one with 96 cores. I just saw that the EPYC 9754 will get 128 cores (albeit at a somewhat low clock frequency) and draws 360 Watt, this is pure madness.
Modern Times
Posts: 3704
Joined: Thu Jun 07, 2012 11:02 pm

Re: Zen 4 will be huge!

Post by Modern Times »

Joost Buijs wrote: Thu Sep 01, 2022 7:42 am Having a lot of cores can be useful for testing, it is probably cheaper to buy a few 'small' machines instead of one with 96 cores. I just saw that the EPYC 9754 will get 128 cores (albeit at a somewhat low clock frequency) and draws 360 Watt, this is pure madness.
I'm not so sure that it is madness. Four 32-core machines would draw significantly more power than one 128 core machine. Running costs probably higher for multiple "small" machines.
Joost Buijs
Posts: 1632
Joined: Thu Jul 16, 2009 10:47 am
Location: Almere, The Netherlands

Re: Zen 4 will be huge!

Post by Joost Buijs »

Modern Times wrote: Thu Sep 01, 2022 8:58 am
Joost Buijs wrote: Thu Sep 01, 2022 7:42 am Having a lot of cores can be useful for testing, it is probably cheaper to buy a few 'small' machines instead of one with 96 cores. I just saw that the EPYC 9754 will get 128 cores (albeit at a somewhat low clock frequency) and draws 360 Watt, this is pure madness.
I'm not so sure that it is madness. Four 32-core machines would draw significantly more power than one 128 core machine. Running costs probably higher for multiple "small" machines.
Since I have solar panels producing more power than I will ever need, the power draw is not so important. I'm not willing to shell out more than 2K for a single CPU, nowadays the economic lifespan of hardware is just a few years, which makes it all very costly.
Modern Times
Posts: 3704
Joined: Thu Jun 07, 2012 11:02 pm

Re: Zen 4 will be huge!

Post by Modern Times »

Joost Buijs wrote: Thu Sep 01, 2022 9:32 am
Since I have solar panels producing more power than I will ever need, the power draw is not so important. I'm not willing to shell out more than 2K for a single CPU, nowadays the economic lifespan of hardware is just a few years, which makes it all very costly.
Fantastic, then yes agreed.
dangi12012
Posts: 1062
Joined: Tue Apr 28, 2020 10:03 pm
Full name: Daniel Infuehr

Re: Zen 4 will be huge!

Post by dangi12012 »

Bit biased, but good summary:
Worlds-fastest-Bitboard-Chess-Movegenerator
Daniel Inführ - Software Developer
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Zen 4 will be huge!

Post by bob »

Modern Times wrote: Tue Aug 30, 2022 12:03 pm No doubt "magnum" will come along soon to tell us that Apple is already a million times better.
who's "magnum"
dangi12012
Posts: 1062
Joined: Tue Apr 28, 2020 10:03 pm
Full name: Daniel Infuehr

Re: Zen 4 will be huge!

Post by dangi12012 »

I wish I had more time....
Could have galois field expansion from BB to NNUE input ready by now..

That would mean that in the future:
You dont need to expand from BB to mailbox in order to use a NN - you could natively expand from BB form to input layer which means a bit of performance gain.

Nvidia with Tensor cores supports this for some time now - as it seems Zen4 will so too.
Together with Bfloat16 and faster cache this is a killer feature for chessprogramming.
Worlds-fastest-Bitboard-Chess-Movegenerator
Daniel Inführ - Software Developer