LCZero FAQ is missing one important fact

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

Moderators: hgm, Rebel, chrisw

Jouni
Posts: 3283
Joined: Wed Mar 08, 2006 8:15 pm

LCZero FAQ is missing one important fact

Post by Jouni »

Why are just GPUs fast with NN engines? Please explain it to me!
Jouni
User avatar
hgm
Posts: 27793
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: LCZero FAQ is missing one important fact

Post by hgm »

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: 4315
Joined: Tue Apr 03, 2012 4:28 pm

Re: LCZero FAQ is missing one important fact

Post by chrisw »

hgm wrote: Fri Jan 04, 2019 10: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: 1796
Joined: Thu Sep 18, 2008 10:24 pm

Re: LCZero FAQ is missing one important fact

Post by Werewolf »

hgm wrote: Fri Jan 04, 2019 10: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: 27793
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: LCZero FAQ is missing one important fact

Post by hgm »

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: 4315
Joined: Tue Apr 03, 2012 4:28 pm

Re: LCZero FAQ is missing one important fact

Post by chrisw »

hgm wrote: Fri Jan 04, 2019 1: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 8:58 pm

Re: LCZero FAQ is missing one important fact

Post by BBauer »

hgm wrote: Fri Jan 04, 2019 1: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: 1010
Joined: Thu Sep 01, 2011 2:49 pm

Re: LCZero FAQ is missing one important fact

Post by MikeGL »

Jouni wrote: Fri Jan 04, 2019 9: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: 6340
Joined: Mon Mar 13, 2006 2:34 pm
Location: Acworth, GA

Re: LCZero FAQ is missing one important fact

Post by AdminX »

MikeGL wrote: Sat Jan 05, 2019 2:24 am
Jouni wrote: Fri Jan 04, 2019 9: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: 43
Joined: Thu Oct 11, 2018 2:26 pm
Full name: Graham Jones

Re: LCZero FAQ is missing one important fact

Post by grahamj »

AdminX wrote: Sat Jan 05, 2019 9:34 am
MikeGL wrote: Sat Jan 05, 2019 2:24 am
Jouni wrote: Fri Jan 04, 2019 9: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