-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve performance #12
Conversation
We were only getting the benefit of set-var-val! vars by not properly passing the state's substitution to walk. This fix reduces latency by between 1/3 and 2/3 on the harder benchmarks (the harder, the more savings, as usual).
So the former 3s benchmark (which was 30s before today) now takes about 2s, and the new former 19s benchmark now takes about 7s. |
FYI, I'm also experimenting with optionally limiting search depth in faster-mk. I have a depth-limiting version which about doubles performance again on top of this pull request (2s -> 1s, 7s -> 4s). Unfortunately I've still yet to see the newest/hardest queries finish without running out of memory, even then. |
I finally found a way to synthesize virtually all of
But the change needed is disappointing to have to make. I changed the definition of The next hardest query (having to guess that |
How are you keeping the synthesis from cheating in these examples? With
I think it would be reasonable, when running on a machine with many cores,
Once again, given enough parallelism at the hardware level, it seems On Fri, Aug 12, 2016 at 9:22 PM, Greg Rosenblatt notifications@github.com
|
Great! Running multiple versions in parallel should also allow us to make use depth limiting for faster queries in many cases without jeopardizing completeness. To get this new synthesis result, I haven't had to change the nature of test cases at all, believe it or not. I'm using the same test cases as seen in |
I just managed to synthesize all of
Guess:
Still using the same test cases as before, with the boolean-only |
I should note that the 39 second timing is with a depth limit. Without the limit, I haven't seen a result even after a few minutes of waiting. |
By the way, it turns out you don't even need Barliman's starting skeleton for the full synthesis result. Without the skeleton, you get the same result in the same amount of time. |
By providing just a little more than the starting skeleton ...
... performance improves dramatically. This one completes correctly in less than 5 seconds. |
Oh, if you're confused as to how this is possible without additional tests to prevent cheating, I forgot to remind you that the depth limit itself also helps to protect against cheating. To avoid confusion, note that this effect is not caused by cheats being pruned by the depth limit directly: the cheats we've seen are found at shallower depths than real answers, so that cannot explain this effect. The real explanation seems to be that interesting lines of search retain more search resources as their siblings die off from hitting the limit. Interesting lines of search are disproportionately rewarded by this sibling pruning, compared with cheating lines of search. This is the same reason that non-gensym test cases with a depth limit are enough to solve some of the problems that require gensym test cases without a limit. We figured this out while trying to understand why |
I've pushed an experimental branch (don't merge it!) for depth-limited search and tweaks to You can manually adjust |
If we had ~100 hardware threads, could we just increase the On Sat, Aug 13, 2016 at 12:16 PM, Greg Rosenblatt notifications@github.com
|
Absolutely, that's the exact arrangement I was thinking we should try! |
Okay! It's probably time to think about getting access to a beefy machine, On Sat, Aug 13, 2016 at 12:18 PM, Greg Rosenblatt notifications@github.com
|
For the simple examples we've been trying, a small depth is always going to work and parallel processes aren't going to help much. Maybe we should first find more involved examples that can benefit from searching across multiple depth limits simultaneously. |
I was able to use your branch to synthesize all of 'zip' in ~30 seconds, On Sat, Aug 13, 2016 at 12:24 PM, Greg Rosenblatt notifications@github.com
|
It seems to have a lot of trouble figuring out to pass the procedure as an argument. This doesn't seem to come back:
But it doesn't take too long for it to guess everything else once you help it with passing the procedure:
I wonder why this is. Maybe backwards information flow in this case is more difficult? |
Seems like unfolding might be very helpful here. We are no where close to Do you think Mercury would be able to do something clever with ` ` On Tue, Aug 16, 2016 at 9:32 AM, Greg Rosenblatt notifications@github.com
|
Not really thinking in terms of Mercury anymore, but I have an idea for using mostly-instantiated code to get to the point faster. I'm going to try adding a |
That might work! There has to be a way to take advantage of the determinism, when we have On Tue, Aug 16, 2016 at 11:08 AM, Greg Rosenblatt notifications@github.com
|
Unfortunately my first attempt with But I did find a set of tests that makes it easier to find a definition for This query completes in about 20 seconds:
|
The full query takes just under 3 minutes:
|
Nice! I particularly like this test: (map ',g1 '()) Parallelization/templated starting guesses should help a lot, I'd think. On Tue, Aug 16, 2016 at 2:15 PM, Greg Rosenblatt notifications@github.com
|
Fix improper walks by list-split-ground
We were only getting the benefit of set-var-val! vars by not properly
passing the state's substitution to walk. This fix reduces latency by
between 1/3 and 2/3 on the harder benchmarks (the harder, the more
savings, as usual).