GPGPU and computer chess

Discussion of chess software programming and technical issues.

Moderator: Ras

wims
Posts: 54
Joined: Sun Dec 19, 2010 6:49 pm

GPGPU and computer chess

Post by wims »

In these days where its fairly cheap and accessable for a normal person to buy a "supercomputer" (for example a gpgpu x4 setup), would it make any sense to build chess engines that can run on this kind of hardware? What are the challenges, advantages and disadvantages of using gpus for chess? Is single thread performance key for chess engines and that having massively paralell computing power is pointless? Or are there other reasons why there are no top engines running on such hardware?
Gian-Carlo Pascutto
Posts: 1260
Joined: Sat Dec 13, 2008 7:00 pm

Re: GPGPU and computer chess

Post by Gian-Carlo Pascutto »

wims wrote:In these days where its fairly cheap and accessable for a normal person to buy a "supercomputer" (for example a gpgpu x4 setup), would it make any sense to build chess engines that can run on this kind of hardware? What are the challenges, advantages and disadvantages of using gpus for chess? Is single thread performance key for chess engines and that having massively paralell computing power is pointless? Or are there other reasons why there are no top engines running on such hardware?
GPU's lose against CPU's in the following areas (more or less in order of importance):

1) divergent branches between threads
2) wide integer capabilities
3) single-core performance
4) available memory / memory latency
5) programming model (no recursion)

2, 4 and 5 can be worked around, at a performance and convenience loss. But 1 and 3 make it difficult. Tree search has some serial dependencies and while it does have large parallelism, the speed of the serial path matters.

The computer power of a GPU is good for data-parallel floating point operations with predictable memory access patterns. For everything else, it struggles.

I have to admit though, that I haven't seen any hard data. Nobody seems to have really tried to port a chess engine over.
rbarreira
Posts: 900
Joined: Tue Apr 27, 2010 3:48 pm

Re: GPGPU and computer chess

Post by rbarreira »

There is no free lunch. It's not like ATI/Nvidia engineers are much smarter than AMD/Intel ones and manage to create a supercomputer for 100 times less money.

Chess developers already find it hard to get a good speedup with a few dozens of CPU cores, what do you think would happen if using hundreds or thousands of GPU cores?

Deep Blue could calculate 200 million nodes per second, yet its parallel efficiency was only 10% due to using so much parallelism. Even if someone manages to shoehorn a chess search and evaluation onto GPU code, it doesn't seem promising.
smatovic
Posts: 3358
Joined: Wed Mar 10, 2010 10:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic

Re: GPGPU and computer chess

Post by smatovic »

I have to admit though, that I haven't seen any hard data. Nobody seems to have really tried to port a chess engine over.
http://zeta-chess.blogspot.com/2010/02/motivation.html

--
srdja
rbarreira
Posts: 900
Joined: Tue Apr 27, 2010 3:48 pm

Re: GPGPU and computer chess

Post by rbarreira »

I found this link, I haven't read the info yet:

http://developer.nvidia.com/object/gpu- ... games.html
Gian-Carlo Pascutto
Posts: 1260
Joined: Sat Dec 13, 2008 7:00 pm

Re: GPGPU and computer chess

Post by Gian-Carlo Pascutto »

smatovic wrote:
I have to admit though, that I haven't seen any hard data. Nobody seems to have really tried to port a chess engine over.
http://zeta-chess.blogspot.com/2010/02/motivation.html
Yeah, but as far as I know you're still far away from having something that can produce hard performance data.
smatovic
Posts: 3358
Joined: Wed Mar 10, 2010 10:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic

Re: GPGPU and computer chess

Post by smatovic »

I found this link, I haven't read the info yet:
Thanks, Dann Corbit also posted a Link some days ago about this GPU AI project:

http://www.nvidia.com/content/GTC-2010/ ... TC2010.pdf

It seems they use global atomics to update alpha/beta values.

But chess is none of the games in their list ;-)

--
srdja
rbarreira
Posts: 900
Joined: Tue Apr 27, 2010 3:48 pm

Re: GPGPU and computer chess

Post by rbarreira »

Gian-Carlo Pascutto wrote:
smatovic wrote:
I have to admit though, that I haven't seen any hard data. Nobody seems to have really tried to port a chess engine over.
http://zeta-chess.blogspot.com/2010/02/motivation.html
Yeah, but as far as I know you're still far away from having something that can produce hard performance data.
The PDF in the link I posted claims $0.02 per node/sec, which would be $400,000 for 20 million nodes/sec (something that a $200 6-core CPU can do). Either it's a mistake or it's really bad performance.
smatovic
Posts: 3358
Joined: Wed Mar 10, 2010 10:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic

Re: GPGPU and computer chess

Post by smatovic »

Yeah, but as far as I know you're still far away from having something that can produce hard performance data.
yeah. indeed.

i am far away from an parallel search algorithm....still working on an effective board presentation and move generation.

--
srdja