-
Notifications
You must be signed in to change notification settings - Fork 99
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
Make global soln indices deterministic #1599
Conversation
What happens when a solution is removed in the middle? |
Do you mean when we delete duplicate solutions? In that case it should fine, since, afaik, that step is done in serial. The non-determinism comes from creating the master library in parallel. |
No, I mean if a solution is replaced by a faster solution, or it is removed due to new optimizations that makes another existing kernel faster. You noticed that indices change between builds and you want to make them deterministic. |
for localIdx, _, s in libraryIter(masterLibrary): | ||
matchTable[s.index] = [s.srcName, localIdx] | ||
LibraryIO.write("MatchTable", matchTable) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the MatchTable be written out after solution sorting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, good catch, thanks!
Oh, I meant for the same commit (no changes to library logic files) if we rebuild multiple times the global solution indices may be different. We can see this by checking the contents of |
Currently, global solution indices can change between different builds. This PR sorts the global solution indices to make them deterministic.