ChessUSA.com TalkChess.com
Hosted by Your Move Chess & Games
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Is there such a thing as branchless move generation?
Post new topic    TalkChess.com Forum Index -> Computer Chess Club: Programming and Technical Discussions Flat
View previous topic :: View next topic  
Author Message
John Hamlen



Joined: 18 Feb 2012
Posts: 25
Location: United Kingdom

PostPost subject: Re: Is there such a thing as branchless move generation?    Posted: Sun Jun 10, 2012 10:58 pm Reply to topic Reply with quote

Daniel Shawul wrote:

Last time I checked NVIDIA tesla's have 64kb that you can divide into 48kb + 16kb shared memory and local cache. If you just want the device to do most of the caching of global mem for you, use 48kb for that otherwise 48kb of shared memory per multi-processor is what you get.

Cheers Daniel. Now all I is to be able to afford a Tesla Smile

[quote="Daniel Shawul"]
Well I use 8 bitboards (2 for white/black pieces and 6 for knight,bishop ...). With the most compact format i.e quad only 4 bitboards = 32 are required.
Daniel Shawul wrote:

Also since you are using 0x88 representation and piece lists you need 128x32bit + 16x32bits = 560bytes. That is a significant difference. You are going to allocate that much for each thread you spawn if you want them to do different work. Also you should be careful about using char tables on gpus because of bank conflicts. Use int whenever possible. Some have tried to use multiple threads (could be a warp) to do a single search (i.e use the threads for fast move generation or evaluation). If that is what you want to do then SIMD friendly move generation makes sense, otherwise the discussion should be a SIMD friendly search...

Wow, that is efficient. Woodpusher used 14. I kept separate boards for the white and black piece types to avoid the &s (the bad old days of 32-bit longs!). Gerd posted something about the quad format too. Will definitely check it out. Thanks also for the memory alignment tip. Yes, SIMD friendly (move gen + move selection + makemove) is what I'll be aiming at to begin with, then I'll start worrying about the search.
Daniel Shawul wrote:

There is no magic formula. Once you write your kernel and determine the amount of registers , shared memory and other resources consumed, you can determine what limits your occupancy. Usually it is register usage that is the problem. For cuda, there is an excel table you can use to tune your usage to get maximum occupancy.

I was afraid that would be the answer Smile. I'll start my moking up in C and then port to CUDA or OpenCL. Thanks again Daniel.
John
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Subject Author Date/Time
Is there such a thing as branchless move generation? John Hamlen Thu Jun 07, 2012 7:50 pm
      Re: Is there such a thing as branchless move generation? Gerd Isenberg Thu Jun 07, 2012 8:44 pm
            Re: Is there such a thing as branchless move generation? John Hamlen Thu Jun 07, 2012 10:18 pm
      Re: Is there such a thing as branchless move generation? Edmund Moshammer Thu Jun 07, 2012 10:57 pm
            Re: Is there such a thing as branchless move generation? John Hamlen Fri Jun 08, 2012 8:21 am
                  Re: Is there such a thing as branchless move generation? Sven Schüle Fri Jun 08, 2012 9:21 am
                        Re: Is there such a thing as branchless move generation? John Hamlen Fri Jun 08, 2012 10:31 am
                              Re: Is there such a thing as branchless move generation? Edmund Moshammer Fri Jun 08, 2012 10:41 am
                                    Re: Is there such a thing as branchless move generation? John Hamlen Sat Jun 09, 2012 1:17 pm
                              Re: Is there such a thing as branchless move generation? Daniel Shawul Fri Jun 08, 2012 11:12 am
                                    Re: Is there such a thing as branchless move generation? Edmund Moshammer Fri Jun 08, 2012 11:18 am
                                          Re: Is there such a thing as branchless move generation? Daniel Shawul Fri Jun 08, 2012 3:39 pm
                                                Re: Is there such a thing as branchless move generation? Vincent Diepeveen Sat Jun 16, 2012 9:07 am
                                                      Re: Is there such a thing as branchless move generation? Daniel Shawul Sat Jun 16, 2012 11:27 am
                                                            Re: Is there such a thing as branchless move generation? Vincent Diepeveen Sat Jun 16, 2012 11:35 am
                                    Re: Is there such a thing as branchless move generation? John Hamlen Sat Jun 09, 2012 2:43 pm
                                          Re: Is there such a thing as branchless move generation? Daniel Shawul Sat Jun 09, 2012 6:02 pm
                                                Re: Is there such a thing as branchless move generation? John Hamlen Sun Jun 10, 2012 2:21 pm
                                                      Re: Is there such a thing as branchless move generation? Daniel Shawul Sun Jun 10, 2012 6:33 pm
                                                            Re: Is there such a thing as branchless move generation? Daniel Shawul Sun Jun 10, 2012 7:16 pm
                                                                  Re: Is there such a thing as branchless move generation? Edmund Moshammer Sun Jun 10, 2012 9:24 pm
                                                                        Re: Is there such a thing as branchless move generation? Daniel Shawul Sun Jun 10, 2012 9:54 pm
                                                                  Re: Is there such a thing as branchless move generation? John Hamlen Sun Jun 10, 2012 10:14 pm
                                                                        Re: Is there such a thing as branchless move generation? Daniel Shawul Mon Jun 11, 2012 12:49 am
                                                                              Re: Is there such a thing as branchless move generation? John Hamlen Mon Jun 11, 2012 12:43 pm
                                                                                    Re: Is there such a thing as branchless move generation? Daniel Shawul Mon Jun 11, 2012 2:41 pm
                                                                                          Re: Is there such a thing as branchless move generation? John Hamlen Mon Jun 11, 2012 10:12 pm
                                                                                          Re: Is there such a thing as branchless move generation? Daniel Shawul Mon Jun 11, 2012 11:12 pm
                                                                                          Re: Is there such a thing as branchless move generation? John Hamlen Mon Jun 11, 2012 11:41 pm
                                                                        Re: Is there such a thing as branchless move generation? Vincent Diepeveen Sat Jun 16, 2012 9:56 am
                                                            Re: Is there such a thing as branchless move generation? John Hamlen Sun Jun 10, 2012 10:58 pm
                                          Re: Is there such a thing as branchless move generation? Gerd Isenberg Sat Jun 09, 2012 7:48 pm
                                                Re: Is there such a thing as branchless move generation? John Hamlen Sun Jun 10, 2012 5:28 pm
            Re: Is there such a thing as branchless move generation? Edmund Moshammer Fri Jun 08, 2012 10:32 am
                  Re: Is there such a thing as branchless move generation? John Hamlen Sat Jun 09, 2012 2:57 pm
                  Re: Is there such a thing as branchless move generation? Vincent Diepeveen Sat Jun 16, 2012 8:57 am
      Re: Zeta CL uses Magic Bitboards Srdja Matovic Mon Jun 11, 2012 2:53 pm
            Re: Zeta CL uses Magic Bitboards Gerd Isenberg Mon Jun 11, 2012 8:55 pm
                  Re: Zeta CL uses Magic Bitboards Srdja Matovic Mon Jun 11, 2012 9:35 pm
                        Re: Zeta CL uses Magic Bitboards Daniel Shawul Mon Jun 11, 2012 11:26 pm
                              Re: Zeta CL uses Magic Bitboards Srdja Matovic Tue Jun 12, 2012 1:16 am
                              Re: Zeta CL uses Magic Bitboards Gerd Isenberg Tue Jun 12, 2012 6:58 am
                                    Re: Zeta CL uses Magic Bitboards Daniel Shawul Tue Jun 12, 2012 1:46 pm
                                          Re: Zeta CL uses Magic Bitboards Srdja Matovic Tue Jun 12, 2012 2:35 pm
                                                Re: Zeta CL uses Magic Bitboards Daniel Shawul Tue Jun 12, 2012 4:37 pm
                                                      Re: Zeta CL uses Magic Bitboards Vincent Diepeveen Sat Jun 16, 2012 8:46 am
                                                            Re: Zeta CL uses Magic Bitboards Daniel Shawul Sat Jun 16, 2012 11:17 am
                                                                  Re: Zeta CL uses Magic Bitboards Vincent Diepeveen Sat Jun 16, 2012 11:30 am
                                                                        Re: Zeta CL uses Magic Bitboards Daniel Shawul Sat Jun 16, 2012 1:56 pm
                                                                              Re: Zeta CL uses Magic Bitboards Vincent Diepeveen Sat Jun 16, 2012 2:51 pm
                  Re: Zeta CL uses Magic Bitboards vs Kogge-Stone Srdja Matovic Tue Jun 12, 2012 1:05 am
                        Re: Zeta CL uses Magic Bitboards vs Kogge-Stone Gerd Isenberg Tue Jun 12, 2012 6:31 am
            Re: Zeta CL uses Magic Bitboards John Hamlen Mon Jun 11, 2012 10:35 pm
                  Re: Zeta CL uses Magic Bitboards Daniel Shawul Mon Jun 11, 2012 11:00 pm
      Re: Is there such a thing as branchless move generation? Vincent Diepeveen Sat Jun 16, 2012 8:40 am
      Re: Is there such a thing as branchless move generation? Vincent Diepeveen Sat Jun 16, 2012 9:23 am
Post new topic    TalkChess.com Forum Index -> Computer Chess Club: Programming and Technical Discussions

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Powered by phpBB © 2001, 2005 phpBB Group
Enhanced with Moby Threads