CPU vs GPU

For discussing go computing, software announcements, etc.
Mike Novack
Lives in sente
Posts: 1045
Joined: Mon Aug 09, 2010 9:36 am
GD Posts: 0
Been thanked: 182 times

Re: CPU vs GPU

Post by Mike Novack »

We Have drifted away from the original question. Kirby wasn't asking how performance changed with change in number of play outs but whether performance depended on whether this was done with or without a GPU being used.

With a GPU the calculations can be performed faster, and since go is ordinarily played with time controls, time per move is the constraint, not number of playouts. But if I understand Kirby's question, he is saying "ignore time required" << time might not be as much a factor in analysis the way it is in play >>

Offhand, as a computer person, I'd say in theory no. If something is computable it is computable on a Turing Machine (or a Wang Machine, etc.) Just very, very slowly. BUT, and this is a big but, I do not know that these programs are in effect using the SAME algorithms when using a GPU as when without. If the same, just passing computations off to the GPU to do faster in parallel, I'd expect not difference.
Uberdude
Judan
Posts: 6727
Joined: Thu Nov 24, 2011 11:35 am
Rank: UK 4 dan
GD Posts: 0
KGS: Uberdude 4d
OGS: Uberdude 7d
Location: Cambridge, UK
Has thanked: 436 times
Been thanked: 3718 times

Re: CPU vs GPU

Post by Uberdude »

X playouts done in parallel on a GPU, or multiple GPUs, might actually give slightly different results to X playouts in series on a single CPU (and depends on # cores of CPU/GPU). This is apparently because splitting the work into batches might increase exploration, I imagine each batch being independent could mean different random fluctuations take precedence in each. See https://www.reddit.com/r/baduk/comments ... i/e1i687s/ and reply from Skuto below. I wonder if this is why Elf on LZ engine seems to not be exploratory enough, but perhaps real Elf run with their engine on their hardware setup for the matches against pros was better.
Uberdude
Judan
Posts: 6727
Joined: Thu Nov 24, 2011 11:35 am
Rank: UK 4 dan
GD Posts: 0
KGS: Uberdude 4d
OGS: Uberdude 7d
Location: Cambridge, UK
Has thanked: 436 times
Been thanked: 3718 times

Re: CPU vs GPU

Post by Uberdude »

Kirby wrote: Is there any reason to use LeelaZero's weights?

Elf is stronger, right? I suppose you can get more ideas on a position by using both.
Yes. LZ is better (but still has problems) at ladders. My impression is that Elf tends to play bad moves in which it doesn't realise it can be captured in a working ladder, whereas LZ plays bad ataris trying to ladder stones which can escape but it assumes they won't. ie without playouts Elf assumes (almost) all ladders don't work whereas LZ assumes (almost) all ladders do work. Is the former a safer delusion? LZ needs fewer playouts than Elf to realise the truth about the ladder.

LZ has less extreme opinions than Elf and this can be helpful when reviewing lopsided games. If I have what I consider a moderate advantage in my mid dan game Elf might give me 99.2%. When the winrate is so high/low the quality of the analysis lowers. It doesn't turn to junk moves and stills plays sensibly unlike AlphaGo Lee, but there's not much difference between the best and mediocre moves. On the other hand LZ just gives me 65% so that's still a lot of game left before 99% land. So Elf is great if you want to find subtle direction mistakes in pro's openings, but I prefer LZ for my middlegame reviews.

Also Elf can be very jumpy in winrate particularly on low playouts. Sometimes I think it is quickly identitying big mistakes but othertimes it's not reading enough.

And yes by reading the gospel according to LZ and the gospel according to Elf you can see which bits they have in common and which differ and wonder where the truth lies.

P.S. Elf tends to like approaching 4-4s whereas LZ 3-3 invades more so if you don't like the invasions that's a plus for Elf.
Post Reply