stockfish with graphics card

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

Moderators: hgm, Dann Corbit, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
h1a8
Posts: 457
Joined: Fri Jun 04, 2010 5:23 am

stockfish with graphics card

Post by h1a8 » Thu Aug 06, 2020 2:21 pm

I know NNUE is the thing now but it doesn't use a graphics card at all.
This may be a stupid question. But would stockfish using a dedicated graphics card for it's NN evaluation while using 100% (and not 60%) of the cpu for search be theoretically stronger than what is being implemented today?

Damir
Posts: 2485
Joined: Mon Feb 11, 2008 2:53 pm
Location: Denmark
Full name: Damir Desevac

Re: stockfish with graphics card

Post by Damir » Thu Aug 06, 2020 2:37 pm

Forget about Stockfish using a Graphic card... that is never going to happen... but you can keep on dreaming... :lol: :lol:

Raphexon
Posts: 386
Joined: Sun Mar 17, 2019 11:00 am
Full name: Henk Drost

Re: stockfish with graphics card

Post by Raphexon » Thu Aug 06, 2020 3:50 pm

NNUE is designed to exploit CPU instructionsets.
GPUfish isn't happening.

daniel71
Posts: 115
Joined: Wed Aug 27, 2008 1:48 am

Re: stockfish with graphics card

Post by daniel71 » Fri Aug 07, 2020 3:09 am

I'm with you, I'm hoping the GPU will be also used along with the CPU because it's a waste to spend thousands of dollars on GPUs to sit idle inside the computer case. If the GPU can be used to update the opening book and improve it as a start to manage opening book theory data.

Milos
Posts: 4064
Joined: Wed Nov 25, 2009 12:47 am

Re: stockfish with graphics card

Post by Milos » Fri Aug 07, 2020 3:29 am

h1a8 wrote:
Thu Aug 06, 2020 2:21 pm
I know NNUE is the thing now but it doesn't use a graphics card at all.
This may be a stupid question. But would stockfish using a dedicated graphics card for it's NN evaluation while using 100% (and not 60%) of the cpu for search be theoretically stronger than what is being implemented today?
The amount of updates i.e. calculations needed to be performed by NNUE is way to small for any GPU. In case it was implemented on GPU you wouldn't be able to have it use even 1% of GPU resources while I/O bandwidth would be totally exhausted. In other words it would be much, much slower than when executed only on CPU.

User avatar
Ovyron
Posts: 4415
Joined: Tue Jul 03, 2007 2:30 am

Re: stockfish with graphics card

Post by Ovyron » Fri Aug 07, 2020 6:52 am

h1a8 wrote:
Thu Aug 06, 2020 2:21 pm
I know NNUE is the thing now but it doesn't use a graphics card at all.
This may be a stupid question. But would stockfish using a dedicated graphics card for it's NN evaluation while using 100% (and not 60%) of the cpu for search be theoretically stronger than what is being implemented today?
The confusion might arise because both are called Neural Networks, but the NNs of Leela and Stockfish are entirely different things.

Jhoravi
Posts: 285
Joined: Wed May 08, 2013 4:49 am

Re: stockfish with graphics card

Post by Jhoravi » Fri Aug 07, 2020 9:58 am

Ovyron wrote:
Fri Aug 07, 2020 6:52 am
h1a8 wrote:
Thu Aug 06, 2020 2:21 pm
I know NNUE is the thing now but it doesn't use a graphics card at all.
This may be a stupid question. But would stockfish using a dedicated graphics card for it's NN evaluation while using 100% (and not 60%) of the cpu for search be theoretically stronger than what is being implemented today?
The confusion might arise because both are called Neural Networks, but the NNs of Leela and Stockfish are entirely different things.
I wanna take this moment to ask about my confusion on this because the wiki doesn't explain. What I believe is that NNUE Net is just a smaller LC0 Net and also trained from zero. Can somebody please correct me?

Raphexon
Posts: 386
Joined: Sun Mar 17, 2019 11:00 am
Full name: Henk Drost

Re: stockfish with graphics card

Post by Raphexon » Fri Aug 07, 2020 12:00 pm

Jhoravi wrote:
Fri Aug 07, 2020 9:58 am
Ovyron wrote:
Fri Aug 07, 2020 6:52 am
h1a8 wrote:
Thu Aug 06, 2020 2:21 pm
I know NNUE is the thing now but it doesn't use a graphics card at all.
This may be a stupid question. But would stockfish using a dedicated graphics card for it's NN evaluation while using 100% (and not 60%) of the cpu for search be theoretically stronger than what is being implemented today?
The confusion might arise because both are called Neural Networks, but the NNs of Leela and Stockfish are entirely different things.
I wanna take this moment to ask about my confusion on this because the wiki doesn't explain. What I believe is that NNUE Net is just a smaller LC0 Net and also trained from zero. Can somebody please correct me?
NNUE is designed in such a way that it can exploit instruction sets of modern CPUs.
When the board changes it only has to update a small part of the net so you don't have to recalculate it every time.
It's NOT a deep neural network like Lc0 uses, it only has 2 fully connected hidden layers.

You can train it from zero, but all nets currently are trained from supervised learning.

User avatar
Ovyron
Posts: 4415
Joined: Tue Jul 03, 2007 2:30 am

Re: stockfish with graphics card

Post by Ovyron » Fri Aug 07, 2020 5:25 pm

Yeah, they're trained from default Stockfish-dev's evals from depth 8 to 12 or so. Nothing being zero here.

Perhaps, since they're not deep, we can call them "shallow neural networks" :)

MOBMAT
Posts: 328
Joined: Sat Feb 04, 2017 10:57 pm
Location: USA

Re: stockfish with graphics card

Post by MOBMAT » Fri Aug 07, 2020 8:30 pm

If the training is easy to set up, then I can imagine having a NNUE tournament where participants provide their own NN file and the games are played using the same version of SF. Let the NNUE games begin!
i7-6700K @ 4.00Ghz (using 6 threads), EGTBs on PCI SSD
Benchmark: Stockfish 11 64 bmi2 (nps): 2067669

Post Reply