Page 1 of 1

LCZero FAQ is missing one important fact

Posted: Fri Jan 04, 2019 9:59 am
by Jouni
Why are just GPUs fast with NN engines? Please explain it to me!

Re: LCZero FAQ is missing one important fact

Posted: Fri Jan 04, 2019 10:15 am
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.

Re: LCZero FAQ is missing one important fact

Posted: Fri Jan 04, 2019 11:10 am
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?”

Re: LCZero FAQ is missing one important fact

Posted: Fri Jan 04, 2019 11:12 am
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.

Re: LCZero FAQ is missing one important fact

Posted: Fri Jan 04, 2019 1:30 pm
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...

Re: LCZero FAQ is missing one important fact

Posted: Fri Jan 04, 2019 1:56 pm
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.

Re: LCZero FAQ is missing one important fact

Posted: Fri Jan 04, 2019 3:11 pm
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

Re: LCZero FAQ is missing one important fact

Posted: Sat Jan 05, 2019 2:24 am
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.

Re: LCZero FAQ is missing one important fact

Posted: Sat Jan 05, 2019 9:34 am
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:

Re: LCZero FAQ is missing one important fact

Posted: Sat Jan 05, 2019 9:45 am
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