Fast perft on GPU (upto 20 Billion nps w/o hashing)

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

ankan
Posts: 77
Joined: Sun Apr 21, 2013 3:29 pm
Full name: Ankan Banerjee

Re: Fast perft on GPU (upto 20 Billion nps w/o hashing)

Post by ankan »

ibid wrote:Very impressive indeed!

I am much slower (on my phenom 1090T):
- 6797 seconds for perft 9 of the initial position for a single-thread no-hash version. (It would probably be ~1200 seconds with multiple threads.)
-paul
Thanks.

That's isn't slow at all for a single threaded CPU code. Your cpu program is about 2 to 3X faster than mine!

Regards,
-Ankan
User avatar
Ajedrecista
Posts: 1968
Joined: Wed Jul 13, 2011 9:04 pm
Location: Madrid, Spain.

gperft almost ready for release?

Post by Ajedrecista »

Hello Paul:

Bold added:
ibid wrote:Very impressive indeed!

I am much slower (on my phenom 1090T):
- 6797 seconds for perft 9 of the initial position for a single-thread no-hash version. (It would probably be ~1200 seconds with multiple threads.)
- 47 seconds for the multi-threaded version with 6 GB of hash table. (Hash tables are a major win...)
- 51 seconds for the program that uses unique positions (this approach is not well suited to such quick searches -- a conventional program can detect the same transpositions via the hash table).

(The first 2 methods are in a program called gperft that is almost ready for release -- it is basically a more general version of the gperftd binary written for the distributed setup.)

I have to imagine a hybrid setup that computes unique positions to a decent depth and feeds the resulting positions to a GPU program with hash tables for shorter perfts would be capable of wonders. :)

-paul
That is very interesting! I wait for a date release. Make sure that you also compile for 32-bit OS... some here still have prehistoric computers, as me... :P

If I am not wrong, gperft can not divide perft results in the output, but it is a minor issue for me; gperft is multi-threaded (something rare in a perft tool), so it is much appreciated. I always wanted to own gperft once I knew that it exists... :roll: Thanks in advance.

I have probably highjacked Ankan's thread: it was not my intention. All the best to you! :wink:

Regards from Spain.

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

Re: Fast perft on GPU (upto 20 Billion nps w/o hashing)

Post by smatovic »

Impressive, Congratulations!

Good luck for your Engine.

--
Srdja
Jhoravi
Posts: 291
Joined: Wed May 08, 2013 6:49 am

Re: Fast perft on GPU (upto 20 Billion nps w/o hashing)

Post by Jhoravi »

Maybe AMDs HSA is the solution here starting with Kaveri to be released this year.
shrapnel
Posts: 1339
Joined: Fri Nov 02, 2012 9:43 am
Location: New Delhi, India

Re: Fast perft on GPU (upto 20 Billion nps w/o hashing)

Post by shrapnel »

Hi Ankan
Not all of us here are software engineers. I'm running 2 GTX 480s in SLI, which are CUDA -capable.
Do you have a chess engine which can utilise the graphic cards ?
If you really think I need the GTX 780, no problem, I'll get 2 if necessary !
But the chess engine should be worth it !
i7 5960X @ 4.1 Ghz, 64 GB G.Skill RipJaws RAM, Twin Asus ROG Strix OC 11 GB Geforce 2080 Tis
ankan
Posts: 77
Joined: Sun Apr 21, 2013 3:29 pm
Full name: Ankan Banerjee

Re: Fast perft on GPU (upto 20 Billion nps w/o hashing)

Post by ankan »

Writing a complete chess engine is my (long term) plan.

I have only made the move generator till now ( perft is just a way to test move generation correctness and speed).

It may take many months (or even years) to get my engine working on gpu. :D
ankan
Posts: 77
Joined: Sun Apr 21, 2013 3:29 pm
Full name: Ankan Banerjee

Re: Fast perft on GPU (upto 20 Billion nps w/o hashing)

Post by ankan »

Writing a complete chess engine is my (long term) plan.

I have only made the move generator till now ( perft is just a way to test move generation correctness and speed).

It may take many months (or even years) to get my engine working on gpu. :D
shrapnel
Posts: 1339
Joined: Fri Nov 02, 2012 9:43 am
Location: New Delhi, India

Re: Fast perft on GPU (upto 20 Billion nps w/o hashing)

Post by shrapnel »

ankan wrote:Writing a complete chess engine is my (long term) plan.

I have only made the move generator till now ( perft is just a way to test move generation correctness and speed).

It may take many months (or even years) to get my engine working on gpu. :D
Fair enough.
Be sure to PM me if you want any beta-testing done :)
Anyway, I'm sure you are on the right track on this.
I've wondered for some time why all the top chess sw programmers insist on making the CPU paramount and ignore the potential of powerful GPUs completely.
Basically, I've come from a hard-core computer gaming background, Quake 4, Counter-Strike and Crysis and the like.
As you are aware, game software developers shifted their focus from the CPU to the GPU a long time ago.
It still amazes me ( and seems slightly backward-looking ) that chess engine developers still focus on the CPU in developing their programs.
I mean, there is a limit to the power of CPUs, which after all have to simultaneously perform multiple other functions. The GPU has no such limitations, and get more and more powerful with each generation ; and when combined in SLI have almost ridiculously high amounts of power.
The CPU, no matter how powerful, cannot compete with sheer Power of the latest GPUs !
So, continue working on this, and if you do succeed in making a chess program which utilises the power of the GPU, you will make the chess programs developed by people like Robert Houdart and Don Dailey, look as if they were developed in the Stone Age !
Regards
i7 5960X @ 4.1 Ghz, 64 GB G.Skill RipJaws RAM, Twin Asus ROG Strix OC 11 GB Geforce 2080 Tis
Jhoravi
Posts: 291
Joined: Wed May 08, 2013 6:49 am

Re: Fast perft on GPU (upto 20 Billion nps w/o hashing)

Post by Jhoravi »

Maybe AMDs GPU plan for this year will help us?
http://www.zdnet.com/amd-aims-to-simpli ... 000014709/
syzygy
Posts: 5557
Joined: Tue Feb 28, 2012 11:56 pm

Re: Fast perft on GPU (upto 20 Billion nps w/o hashing)

Post by syzygy »

shrapnel wrote:It still amazes me ( and seems slightly backward-looking ) that chess engine developers still focus on the CPU in developing their programs.
I mean, there is a limit to the power of CPUs, which after all have to simultaneously perform multiple other functions. The GPU has no such limitations, and get more and more powerful with each generation ; and when combined in SLI have almost ridiculously high amounts of power.
Since you are so far ahead of all these backward chess programmers and are so much better informed on such a wide variety of topics, why don't you teach them all a lesson and come up with something of your own?