Stockfish NN release (NNUE)

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

Moderators: hgm, Rebel, chrisw

Joerg Oster
Posts: 937
Joined: Fri Mar 10, 2006 4:29 pm
Location: Germany

Re: Stockfish NN release (NNUE)

Post by Joerg Oster »

pohl4711 wrote: Sun Jun 21, 2020 5:25 am I need a non-bmi2 compile (but with popc), for AMD Ryzen. BMI2 is terrible slow on AMD
Hi Stefan,
try this one https://www.file-upload.net/download-14 ... 2.exe.html
It's a modern build but still with AVX2 instructions.
No guarantee it works. :)
Jörg Oster
Joerg Oster
Posts: 937
Joined: Fri Mar 10, 2006 4:29 pm
Location: Germany

Re: Stockfish NN release (NNUE)

Post by Joerg Oster »

Rom77 wrote: Sun Jun 21, 2020 4:30 pm
zenpawn wrote: Sun Jun 21, 2020 2:24 pm Thanks. In particular, I'm wondering what makes it "efficiently updatable" in a way that, say, LCZero is not.
Efficiency is promoted by a special structure of a neural network.

Almost all the weights of the neural network are located on the input layer, and much less in the intermediate layers (whereas Leela has a lot of calculations in the intermediate layers).

Most of the input features are zero. Accordingly, the weights by which they are multiplied in the input layer do not need to be calculated.

When a move is made, the state of only two input features changes (except when the king moves). Therefore, you only need to subtract the weight of the old position of the piece and add a new one. All intermediate layers will need to be recalculated, but there will be few calculations.
Thanks for the helpful info!

So in a case of a capture, do we have three input changes then,
one for the side of the captured piece, and two for the side to move?
Jörg Oster
Rom77
Posts: 45
Joined: Wed Oct 24, 2018 7:37 am
Full name: Roman Zhukov

Re: Stockfish NN release (NNUE)

Post by Rom77 »

Joerg Oster wrote: Sun Jun 21, 2020 5:30 pm Thanks for the helpful info!

So in a case of a capture, do we have three input changes then,
one for the side of the captured piece, and two for the side to move?
Sorry, I don't know. Perhaps the answer is in the docs in the links in my posts above.
User avatar
pohl4711
Posts: 2434
Joined: Sat Sep 03, 2011 7:25 am
Location: Berlin, Germany
Full name: Stefan Pohl

Re: Stockfish NN release (NNUE)

Post by pohl4711 »

Joerg Oster wrote: Sun Jun 21, 2020 5:23 pm
pohl4711 wrote: Sun Jun 21, 2020 5:25 am I need a non-bmi2 compile (but with popc), for AMD Ryzen. BMI2 is terrible slow on AMD
Hi Stefan,
try this one https://www.file-upload.net/download-14 ... 2.exe.html
It's a modern build but still with AVX2 instructions.
No guarantee it works. :)
It works! But it runs only +7.8% faster on my AMD Ryzen 12core, than the BMI2-version. Strange. The "normal" Stockfish are much, much faster with popcount compared to bmi2. But 7.8% are better than nothing, of course.
Joerg Oster
Posts: 937
Joined: Fri Mar 10, 2006 4:29 pm
Location: Germany

Re: Stockfish NN release (NNUE)

Post by Joerg Oster »

pohl4711 wrote: Sun Jun 21, 2020 7:34 pm
Joerg Oster wrote: Sun Jun 21, 2020 5:23 pm
pohl4711 wrote: Sun Jun 21, 2020 5:25 am I need a non-bmi2 compile (but with popc), for AMD Ryzen. BMI2 is terrible slow on AMD
Hi Stefan,
try this one https://www.file-upload.net/download-14 ... 2.exe.html
It's a modern build but still with AVX2 instructions.
No guarantee it works. :)
It works! But it runs only +7.8% faster on my AMD Ryzen 12core, than the BMI2-version. Strange. The "normal" Stockfish are much, much faster with popcount compared to bmi2. But 7.8% are better than nothing, of course.
Glad it even works at all!
Jörg Oster
jjoshua2
Posts: 99
Joined: Sat Mar 10, 2018 6:16 am

Re: Stockfish NN release (NNUE)

Post by jjoshua2 »

Can you make a stockfish.nnue.halfkp_384x2-32-32-modern?
jjoshua2
Posts: 99
Joined: Sat Mar 10, 2018 6:16 am

Re: Stockfish NN release (NNUE)

Post by jjoshua2 »

Joerg Oster wrote: Sun Jun 21, 2020 5:23 pm It's a modern build but still with AVX2 instructions.
nodchip posted a new release. https://github.com/nodchip/Stockfish/re ... 2020-06-22
Some popcnt/avx2 builds for all these binaries would be useful I'm sure! And nodchip on these ryzen builds says "Could you please send a pull request? I will merge it."
Damir
Posts: 2801
Joined: Mon Feb 11, 2008 3:53 pm
Location: Denmark
Full name: Damir Desevac

Re: Stockfish NN release (NNUE)

Post by Damir »

Sorry but I can not support this engine in any way. It is not user friendly. When I try and load it in Infinity GUI it stops responding and crashes after few moves when still in book.. :roll: :roll: :roll:.
Jesse Gersenson
Posts: 593
Joined: Sat Aug 20, 2011 9:43 am

Re: Stockfish NN release (NNUE)

Post by Jesse Gersenson »

Does anyone have a reliable method for building this project on Linux?
peter
Posts: 3186
Joined: Sat Feb 16, 2008 7:38 am
Full name: Peter Martan

Re: Stockfish NN release (NNUE)

Post by peter »

jjoshua2 wrote: Mon Jun 22, 2020 4:15 am
Joerg Oster wrote: Sun Jun 21, 2020 5:23 pm It's a modern build but still with AVX2 instructions.
nodchip posted a new release. https://github.com/nodchip/Stockfish/re ... 2020-06-22
Some popcnt/avx2 builds for all these binaries would be useful I'm sure! And nodchip on these ryzen builds says "Could you please send a pull request? I will merge it."
These popcnt compiles from Norman work fine for me
https://github.com/FireFather/sf-nnue/releases
Peter.