Repository navigation
fix(partitioned)!: bound auto threads by the recommended partition count - #202
Merged
Merged
Conversation
`SolutionPartitioner::recommended_partition_count` was documented as the partitioned phase's input for its thread count, and `FunctionalPartitioner::with_recommended_count` set it, but nothing read it. With `thread_count = auto`, partitioned search now runs at most `min(available cores, partition count, recommended count)` threads; an explicit count, `none` and `ThreadCount::Unlimited` are unaffected. The recommendation is a `NonZeroUsize`, since zero partitions at once means nothing. Closes #201. BREAKING CHANGE: `SolutionPartitioner::recommended_partition_count` returns `Option<NonZeroUsize>`, `FunctionalPartitioner::with_recommended_count` takes a `NonZeroUsize`, and `ThreadCount::resolve` takes the recommendation as a second argument.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #201. Base
main@6a9f27c9, one commitea589bb0.Gate (fmt, clippy, doc-names file-length facade-reachability public-api deps, rustdoc, examples, workspace all-feature tests, doctests): EXIT 0, 1556 passed, 0 failed, 69 result lines. Mutation check: resolving without the recommendation fails
auto_threads_follow_the_recommended_partition_count(pool of 4 instead of 2 on a 12-core host).