What is the meaning of "minimum split depth"
Moderators: hgm, Rebel, chrisw
-
- Posts: 342
- Joined: Tue Jan 19, 2010 2:05 am
What is the meaning of "minimum split depth"
What exactly does it effect and how does it relate to the # of cores? Reference: stockfish
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: What is the meaning of "minimum split depth"
Probably the idea came from Crafty. The basic idea is that you don't want to split too near the q-search, because the resulting sub-trees are very small, and the effort to do a split can exceed the effort required to do the entire search.benstoker wrote:What exactly does it effect and how does it relate to the # of cores? Reference: stockfish
This paramater has two effects that are diametrically opposed.
(1) as it is made larger, you do fewer splits, and incur less split overhead. And by pushing the splits back closer to the root, you also have a pretty good chance of choosing a good split point since move ordering is more accurate nearer to the root. But you also increase the amount of time when threads have no work to do, waiting for some search to back up enough so that it can split after it satisfies this condition. NPS will drop. But time to depth will drop too. For a while. As you make this larger and larger, NPS will continue to drop, and time to depth will start to rise. Obvious boundary condition is to set this to infinity and you never do a split at all.
(2) as this value is reduced, you split near to the frontier where you cross over into the q-search. You end up with less processor idle time, since you don't have to wait as long to split, but overhead goes up along with the increase in NPS and the time-to-depth number can start to rise.
This is something that needs tuning for each SMP machine you run on, in the case of crafty. In my code, there are other parameters (such as minimum thread group which limits how many processors can work together at one split point) and such.
-
- Posts: 6401
- Joined: Thu Mar 09, 2006 8:30 pm
- Location: Chicago, Illinois, USA
Re: What is the meaning of "minimum split depth"
I think it is more likely it came from Glaurung.bob wrote:Probably the idea came from Crafty.benstoker wrote:What exactly does it effect and how does it relate to the # of cores? Reference: stockfish
Miguel
The basic idea is that you don't want to split too near the q-search, because the resulting sub-trees are very small, and the effort to do a split can exceed the effort required to do the entire search.
This paramater has two effects that are diametrically opposed.
(1) as it is made larger, you do fewer splits, and incur less split overhead. And by pushing the splits back closer to the root, you also have a pretty good chance of choosing a good split point since move ordering is more accurate nearer to the root. But you also increase the amount of time when threads have no work to do, waiting for some search to back up enough so that it can split after it satisfies this condition. NPS will drop. But time to depth will drop too. For a while. As you make this larger and larger, NPS will continue to drop, and time to depth will start to rise. Obvious boundary condition is to set this to infinity and you never do a split at all.
(2) as this value is reduced, you split near to the frontier where you cross over into the q-search. You end up with less processor idle time, since you don't have to wait as long to split, but overhead goes up along with the increase in NPS and the time-to-depth number can start to rise.
This is something that needs tuning for each SMP machine you run on, in the case of crafty. In my code, there are other parameters (such as minimum thread group which limits how many processors can work together at one split point) and such.
-
- Posts: 4190
- Joined: Wed Nov 25, 2009 1:47 am
Re: What is the meaning of "minimum split depth"
It came from Bob or even Marsland in time when Tord was not even a teenager...michiguel wrote:I think it is more likely it came from Glaurung.
-
- Posts: 1243
- Joined: Sat Dec 13, 2008 7:00 pm
Re: What is the meaning of "minimum split depth"
For once Bob will claim "we did this in the 70's" and I'll actually agree.Milos wrote:It came from Bob or even Marsland in time when Tord was not even a teenager...michiguel wrote:I think it is more likely it came from Glaurung.
-
- Posts: 6401
- Joined: Thu Mar 09, 2006 8:30 pm
- Location: Chicago, Illinois, USA
Re: What is the meaning of "minimum split depth"
Yes, It must have come from Bob, I know. Not from CraftyGian-Carlo Pascutto wrote:For once Bob will claim "we did this in the 70's" and I'll actually agree.Milos wrote:It came from Bob or even Marsland in time when Tord was not even a teenager...michiguel wrote:I think it is more likely it came from Glaurung.
Miguel
PS: Anyway, isn't this an obvious concept? not doing something expensive at the tips?
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: What is the meaning of "minimum split depth"
And likely _that_ came from Crafty. This "idea" has been used since 1996-1997 when Crafty first started to use parallel search. Nothing new as it was also used in Cray Blitz in 1984.michiguel wrote:I think it is more likely it came from Glaurung.bob wrote:Probably the idea came from Crafty.benstoker wrote:What exactly does it effect and how does it relate to the # of cores? Reference: stockfish
Miguel
The basic idea is that you don't want to split too near the q-search, because the resulting sub-trees are very small, and the effort to do a split can exceed the effort required to do the entire search.
This paramater has two effects that are diametrically opposed.
(1) as it is made larger, you do fewer splits, and incur less split overhead. And by pushing the splits back closer to the root, you also have a pretty good chance of choosing a good split point since move ordering is more accurate nearer to the root. But you also increase the amount of time when threads have no work to do, waiting for some search to back up enough so that it can split after it satisfies this condition. NPS will drop. But time to depth will drop too. For a while. As you make this larger and larger, NPS will continue to drop, and time to depth will start to rise. Obvious boundary condition is to set this to infinity and you never do a split at all.
(2) as this value is reduced, you split near to the frontier where you cross over into the q-search. You end up with less processor idle time, since you don't have to wait as long to split, but overhead goes up along with the increase in NPS and the time-to-depth number can start to rise.
This is something that needs tuning for each SMP machine you run on, in the case of crafty. In my code, there are other parameters (such as minimum thread group which limits how many processors can work together at one split point) and such.
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: What is the meaning of "minimum split depth"
Not quite. But we did do it in 1984 when we did the first "real" parallel search in Cray Blitz. 1983 was a hack where we only split at the root, having only 2 weeks from the time Cray said "we have a 2 cpu machine you can use in New York" until the tournament started.Gian-Carlo Pascutto wrote:For once Bob will claim "we did this in the 70's" and I'll actually agree.Milos wrote:It came from Bob or even Marsland in time when Tord was not even a teenager...michiguel wrote:I think it is more likely it came from Glaurung.
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: What is the meaning of "minimum split depth"
Depends on the architecture. In Cray Blitz, until we hit the C90/T90 boxes, we used a value of "0" for this as we could split at the tips (or even beyond) quite efficiently thanks to the memory bandwidth of that box. It began to be an issue when we hit 16 cpus, and then 32 on the T90. On the PC, I have used values from 2 to 6 so far. And I think that when we ran on an older 64-node Itanium box we used 8 to 10 (Eugene would have to answer that, it was his box, I just suggested playing with the value). Splitting was pretty expensive on that machine as it was a "poor NUMA" box.michiguel wrote:Yes, It must have come from Bob, I know. Not from CraftyGian-Carlo Pascutto wrote:For once Bob will claim "we did this in the 70's" and I'll actually agree.Milos wrote:It came from Bob or even Marsland in time when Tord was not even a teenager...michiguel wrote:I think it is more likely it came from Glaurung.
Miguel
PS: Anyway, isn't this an obvious concept? not doing something expensive at the tips?
-
- Posts: 342
- Joined: Tue Jan 19, 2010 2:05 am
Re: What is the meaning of "minimum split depth"
Can the split point be automatically determined as a function of NPS? Rather than hard coding it in?bob wrote:Probably the idea came from Crafty. The basic idea is that you don't want to split too near the q-search, because the resulting sub-trees are very small, and the effort to do a split can exceed the effort required to do the entire search.benstoker wrote:What exactly does it effect and how does it relate to the # of cores? Reference: stockfish
This paramater has two effects that are diametrically opposed.
(1) as it is made larger, you do fewer splits, and incur less split overhead. And by pushing the splits back closer to the root, you also have a pretty good chance of choosing a good split point since move ordering is more accurate nearer to the root. But you also increase the amount of time when threads have no work to do, waiting for some search to back up enough so that it can split after it satisfies this condition. NPS will drop. But time to depth will drop too. For a while. As you make this larger and larger, NPS will continue to drop, and time to depth will start to rise. Obvious boundary condition is to set this to infinity and you never do a split at all.
(2) as this value is reduced, you split near to the frontier where you cross over into the q-search. You end up with less processor idle time, since you don't have to wait as long to split, but overhead goes up along with the increase in NPS and the time-to-depth number can start to rise.
This is something that needs tuning for each SMP machine you run on, in the case of crafty. In my code, there are other parameters (such as minimum thread group which limits how many processors can work together at one split point) and such.