stockfish with graphics card

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

Moderators: hgm, Rebel, chrisw

h1a8
Posts: 508
Joined: Fri Jun 04, 2010 7:23 am

stockfish with graphics card

Post by h1a8 »

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: 2801
Joined: Mon Feb 11, 2008 3:53 pm
Location: Denmark
Full name: Damir Desevac

Re: stockfish with graphics card

Post by Damir »

Forget about Stockfish using a Graphic card... that is never going to happen... but you can keep on dreaming... :lol: :lol:
Raphexon
Posts: 476
Joined: Sun Mar 17, 2019 12:00 pm
Full name: Henk Drost

Re: stockfish with graphics card

Post by Raphexon »

NNUE is designed to exploit CPU instructionsets.
GPUfish isn't happening.
daniel71
Posts: 146
Joined: Wed Aug 27, 2008 3:48 am

Re: stockfish with graphics card

Post by daniel71 »

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: 4190
Joined: Wed Nov 25, 2009 1:47 am

Re: stockfish with graphics card

Post by Milos »

h1a8 wrote: Thu Aug 06, 2020 4: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: 4556
Joined: Tue Jul 03, 2007 4:30 am

Re: stockfish with graphics card

Post by Ovyron »

h1a8 wrote: Thu Aug 06, 2020 4: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: 291
Joined: Wed May 08, 2013 6:49 am

Re: stockfish with graphics card

Post by Jhoravi »

Ovyron wrote: Fri Aug 07, 2020 8:52 am
h1a8 wrote: Thu Aug 06, 2020 4: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: 476
Joined: Sun Mar 17, 2019 12:00 pm
Full name: Henk Drost

Re: stockfish with graphics card

Post by Raphexon »

Jhoravi wrote: Fri Aug 07, 2020 11:58 am
Ovyron wrote: Fri Aug 07, 2020 8:52 am
h1a8 wrote: Thu Aug 06, 2020 4: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: 4556
Joined: Tue Jul 03, 2007 4:30 am

Re: stockfish with graphics card

Post by Ovyron »

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: 385
Joined: Sat Feb 04, 2017 11:57 pm
Location: USA

Re: stockfish with graphics card

Post by MOBMAT »

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 32Gb, Win 10 Home, EGTBs on PCI SSD
Benchmark: Stockfish15.1 NNUE x64 bmi2 (nps): 1277K