GPGPU Chess Engine for Stockfish!!!

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
abhishek0

GPGPU Chess Engine for Stockfish!!!

Post by abhishek0 » Mon Jul 05, 2010 5:08 am

Hello all,

I am a B-Tech student going to focus my efforts on making <stockfish> utilize GPGPU efficiency. Therefore its my humble question to all, IS this possible??

Does the stockfish code itself has an architecture that can help me "integrate" the opencl kernels for GPGPU optimization??

Do I have to change the entire code to have stockfish optimized for parallel computation or will the code structure allow me to insert the new code in the legacy one without changing the original one.

And finally is it even possible to make a chess engine GPGPU optimized??

Thanks!!!

Daniel Shawul
Posts: 3762
Joined: Tue Mar 14, 2006 10:34 am
Location: Ethiopia
Contact:

Re: GPGPU Chess Engine for Stockfish!!!

Post by Daniel Shawul » Mon Jul 05, 2010 5:49 am

It is probably not a feasible project. Why not start with something very simple like devising an alpha-beta algorithm suitable for GPU computation?
There was a post here awhile back on this same problem and it is not something trivial .
Daniel

rbarreira
Posts: 900
Joined: Tue Apr 27, 2010 1:48 pm

Re: GPGPU Chess Engine for Stockfish!!!

Post by rbarreira » Mon Jul 05, 2010 9:49 am

Better start with something with simple rules like Tic-Tac-Toe or maybe Connect 4. Chess doesn't seem like the easiest game for trying out new ideas...

Just my 2 cents...

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

Re: GPGPU Chess Engine for Stockfish!!!

Post by smatovic » Mon Jul 05, 2010 7:13 pm

Do I have to change the entire code to have stockfish optimized for parallel computation or will the code structure allow me to insert the new code in the legacy one without changing the original one.
Imo you have to redesign the complete code and architecture to perform well on a GPU. So it could be easier to develop a new engine from scratch. But the know-how in stockfish, move generation, evaluation, is valuable for sure.
And finally is it even possible to make a chess engine GPGPU optimized??
Afaik there are two active attempts for GPU Chess:

http://zeta-chess.blogspot.com/
http://blog.cudachess.org/

There are some main technical aspects in which a GPU differs from a CPU.
A GPU works in SIMD and SPMD matter with thousands of concurrent threads, each with a very little amount of local memory (32-512 Bytes).
Therefore a programer has to get at first a move generator running which performs well on a SIMD machine and at second has to design a parallel search algorithm which keeps thousands of threads busy. And this with ~128 Bytes of local memory per thread.

Just rewriting Stockfish in OpenCL won't work.

vb4
Posts: 154
Joined: Sat Mar 11, 2006 4:45 am
Location: NY

Re: GPGPU Chess Engine for Stockfish!!!

Post by vb4 » Tue Jul 06, 2010 2:14 am

Although my general understanding is that it will be a difficult task that doesnt mean you shouldnt try it. Many new ideas come from such explorations. As an incentive if it can be done I may have access to a very large number of GPU's that a company appears willing to dedicate for this purpose. Just a thought <S>.

Post Reply