AB search with NN on GPU...

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

smatovic
Posts: 2645
Joined: Wed Mar 10, 2010 10:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic

AB search with NN on GPU...

Post by smatovic »

Maybe it is of interest for someone, I tried, but could not figure out a way
how to do it.

https://eta-chess.app26.de/

In short, the host-device-latencies, aka. kernel-launch-overhead, are currently
in the range of 5 microseconds up to 100 of microseconds, you end up up with
max. 200K kernel calls per second. This is primary not caused by the PCIe
connection (maybe 10s of ns?) but (speculation) by the embedded CPU controller
on GPU who launches the kernels. So you need to couple tasks to batches to be
executed in one run, not that conform with the serial nature of AlphaBeta.

Maybe upcoming architectures will have lower latencies, dunno.

Another path could be to drop the search part completely, encode all in another
kind of mega NN structure and perform only a depth 1 search for evaluation,
maybe with multiple kind of NNs as ID loop replacement...

--
Srdja
Dann Corbit
Posts: 12540
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: AB search with NN on GPU...

Post by Dann Corbit »

The new AMD stuff is {eventually} going to have transparent memory access, including having the CPU read the video RAM directly instead of copy to and from.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
smatovic
Posts: 2645
Joined: Wed Mar 10, 2010 10:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic

Re: AB search with NN on GPU...

Post by smatovic »

Dann Corbit wrote: Thu Aug 13, 2020 4:44 pm The new AMD stuff is {eventually} going to have transparent memory access, including having the CPU read the video RAM directly instead of copy to and from.
Yes, they plan something like this for Infinity Fabric gen 3 or alike, not sure when and if this will make it to the desktop PC, offers for sure some new designs in GPGPU programming, time will tell.

--
Srdja
Dann Corbit
Posts: 12540
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: AB search with NN on GPU...

Post by Dann Corbit »

smatovic wrote: Thu Aug 13, 2020 4:52 pm
Dann Corbit wrote: Thu Aug 13, 2020 4:44 pm The new AMD stuff is {eventually} going to have transparent memory access, including having the CPU read the video RAM directly instead of copy to and from.
Yes, they plan something like this for Infinity Fabric gen 3 or alike, not sure when and if this will make it to the desktop PC, offers for sure some new designs in GPGPU programming, time will tell.

--
Srdja
That is when LC0 will plow the new Stockfish under the dirt and have a hearty belly laugh.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
Masta
Posts: 28
Joined: Fri Jul 26, 2013 6:24 am

Re: AB search with NN on GPU...

Post by Masta »

Dann Corbit wrote: Thu Aug 13, 2020 5:26 pm
smatovic wrote: Thu Aug 13, 2020 4:52 pm
Dann Corbit wrote: Thu Aug 13, 2020 4:44 pm The new AMD stuff is {eventually} going to have transparent memory access, including having the CPU read the video RAM directly instead of copy to and from.
Yes, they plan something like this for Infinity Fabric gen 3 or alike, not sure when and if this will make it to the desktop PC, offers for sure some new designs in GPGPU programming, time will tell.

--
Srdja
That is when LC0 will plow the new Stockfish under the dirt and have a hearty belly laugh.
SF NNUE is laughing now. BTW Lc0 will never have a chance to laugh like you are saying. Sorry.