Page 1 of 1

GPGPU Chess Engine for Stockfish!!!

Posted: Mon Jul 05, 2010 7:08 am
by abhishek0
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!!!

Re: GPGPU Chess Engine for Stockfish!!!

Posted: Mon Jul 05, 2010 7:49 am
by Daniel Shawul
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

Re: GPGPU Chess Engine for Stockfish!!!

Posted: Mon Jul 05, 2010 11:49 am
by rbarreira
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...

Re: GPGPU Chess Engine for Stockfish!!!

Posted: Mon Jul 05, 2010 9:13 pm
by smatovic
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.

Re: GPGPU Chess Engine for Stockfish!!!

Posted: Tue Jul 06, 2010 4:14 am
by vb4
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>.