LCZero FAQ is missing one important fact

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

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
Jouni
Posts: 2004
Joined: Wed Mar 08, 2006 7:15 pm

LCZero FAQ is missing one important fact

Post by Jouni » Fri Jan 04, 2019 8:59 am

Why are just GPUs fast with NN engines? Please explain it to me!
Jouni

User avatar
hgm
Posts: 23716
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: LCZero FAQ is missing one important fact

Post by hgm » Fri Jan 04, 2019 9:15 am

It requires very many multiplications to calculate the output of a neural net: ever connection between cells require one. (And the LC0 NN has about a million cells and a billion connections between them.) GPUs are designed to do many (hundreds) multiplications simultaneously. So they can do this much faster as CPUs, which can only do a few multiplications at the time.

chrisw
Posts: 2091
Joined: Tue Apr 03, 2012 2:28 pm

Re: LCZero FAQ is missing one important fact

Post by chrisw » Fri Jan 04, 2019 10:10 am

hgm wrote:
Fri Jan 04, 2019 9:15 am
It requires very many multiplications to calculate the output of a neural net: ever connection between cells require one. (And the LC0 NN has about a million cells and a billion connections between them.) GPUs are designed to do many (hundreds) multiplications simultaneously. So they can do this much faster as CPUs, which can only do a few multiplications at the time.
Literal-metaphorical-pedantic decoder here. The original question is not good english and written by a non-original english speaker, hence could be asking several things. You only answered the obvious one, and that’s well known, so I’ld assume he meant something else. You answered the question assuming “just GPUs” meaning “why are GPUs and not CPUs fast with NN engines?”
But he could well have meant: “why are just GPUs fast with NN engines and not AB engines?” or “why not write AB engines with GPU?”

Werewolf
Posts: 1193
Joined: Thu Sep 18, 2008 8:24 pm

Re: LCZero FAQ is missing one important fact

Post by Werewolf » Fri Jan 04, 2019 10:12 am

hgm wrote:
Fri Jan 04, 2019 9:15 am
It requires very many multiplications to calculate the output of a neural net: ever connection between cells require one. (And the LC0 NN has about a million cells and a billion connections between them.) GPUs are designed to do many (hundreds) multiplications simultaneously. So they can do this much faster as CPUs, which can only do a few multiplications at the time.
Nice answer.

User avatar
hgm
Posts: 23716
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: LCZero FAQ is missing one important fact

Post by hgm » Fri Jan 04, 2019 12:30 pm

Let it be noted that some people view incompleteness of an answer to a posted question not as an opportunity to provide a better answer, but only as an opportunity to foulmouth those who try to be helpful...

chrisw
Posts: 2091
Joined: Tue Apr 03, 2012 2:28 pm

Re: LCZero FAQ is missing one important fact

Post by chrisw » Fri Jan 04, 2019 12:56 pm

hgm wrote:
Fri Jan 04, 2019 12:30 pm
Let it be noted that some people view incompleteness of an answer to a posted question not as an opportunity to provide a better answer, but only as an opportunity to foulmouth those who try to be helpful...
Que?!

If I foul-mouthed anybody it would on myself for calling myself a literal-metaphorical pedantic. Or if I missed it, where is the foul-mouthing, please?

Edit: ah, maybe you think literal-metaphorical pedantic decoder referred to you?
Okay, literally metaphorically and pedantically here again,if any possibility of ambiguity, select the benign version, else that’s how wars begin.

BBauer
Posts: 658
Joined: Wed Mar 08, 2006 7:58 pm

Re: LCZero FAQ is missing one important fact

Post by BBauer » Fri Jan 04, 2019 2:11 pm

hgm wrote:
Fri Jan 04, 2019 12:30 pm
Let it be noted that some people view incompleteness of an answer to a posted question not as an opportunity to provide a better answer, but only as an opportunity to foulmouth those who try to be helpful...
foulmouth foulmouth foulmouth ???

moderation please

Kind regards
Bernhard

MikeGL
Posts: 900
Joined: Thu Sep 01, 2011 12:49 pm

Re: LCZero FAQ is missing one important fact

Post by MikeGL » Sat Jan 05, 2019 1:24 am

Jouni wrote:
Fri Jan 04, 2019 8:59 am
Why are just GPUs fast with NN engines? Please explain it to me!
Before AlphaZero even came out including its paper, there was already a thread here by someone asking about harnessing GPU power because this expensive piece of hardware was just uselessly sitting down inside our machines during that time and nobody bothered to care. There were even replies that it is useless for chess, since it is only strong in serial and something like that and not very good in branching (jmp's) in code. Can't find the thread now. Maybe it was in Programming section, but most likely here in General Topics.
I told my wife that a husband is like a fine wine; he gets better with age. The next day, she locked me in the cellar.

User avatar
AdminX
Posts: 5153
Joined: Mon Mar 13, 2006 1:34 pm
Location: Acworth, GA
Contact:

Re: LCZero FAQ is missing one important fact

Post by AdminX » Sat Jan 05, 2019 8:34 am

MikeGL wrote:
Sat Jan 05, 2019 1:24 am
Jouni wrote:
Fri Jan 04, 2019 8:59 am
Why are just GPUs fast with NN engines? Please explain it to me!
Before AlphaZero even came out including its paper, there was already a thread here by someone asking about harnessing GPU power because this expensive piece of hardware was just uselessly sitting down inside our machines during that time and nobody bothered to care. There were even replies that it is useless for chess, since it is only strong in serial and something like that and not very good in branching (jmp's) in code. Can't find the thread now. Maybe it was in Programming section, but most likely here in General Topics.
I remember reading that thread Mike. :mrgreen:
"Good decisions come from experience, and experience comes from bad decisions."
__________________________________________________________________
Ted Summers

grahamj
Posts: 37
Joined: Thu Oct 11, 2018 12:26 pm
Full name: Graham Jones

Re: LCZero FAQ is missing one important fact

Post by grahamj » Sat Jan 05, 2019 8:45 am

AdminX wrote:
Sat Jan 05, 2019 8:34 am
MikeGL wrote:
Sat Jan 05, 2019 1:24 am
Jouni wrote:
Fri Jan 04, 2019 8:59 am
Why are just GPUs fast with NN engines? Please explain it to me!
Before AlphaZero even came out including its paper, there was already a thread here by someone asking about harnessing GPU power because this expensive piece of hardware was just uselessly sitting down inside our machines during that time and nobody bothered to care. There were even replies that it is useless for chess, since it is only strong in serial and something like that and not very good in branching (jmp's) in code. Can't find the thread now. Maybe it was in Programming section, but most likely here in General Topics.
I remember reading that thread Mike. :mrgreen:
I think there was more than one. It's annoying that the search here treats three letter words like GPU as noise. Poster smatovic (Srjda) is interested in using GPUs for chess (and so am I). Searching for posts by smatovic found these among many others.

viewtopic.php?f=7&t=63346&p=708514#p708514
viewtopic.php?f=7&t=64322&p=719530#p719530
Graham Jones, www.indriid.com

Post Reply