Conversation
f5d3eb0 to
8fe0f1e
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes issues with the set_workers functionality in the SciPy interface of mkl_fft, aligning the default workers value with the maximum number of threads provided by MKL instead of the CPU count. Key changes include updating tests to use mkl.get_max_threads(), refactoring the logic in _workers_to_num_threads, and updating documentation and changelog accordingly.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| mkl_fft/tests/third_party/scipy/test_multithreading.py | Updated tests to use mkl.get_max_threads() instead of os.cpu_count() and adjusted expected default values. |
| mkl_fft/interfaces/_scipy_fft.py | Refactored workers handling and error messaging to rely on MKL thread counts. |
| mkl_fft/interfaces/README.md | Updated documentation to reflect the new default behavior for workers. |
| CHANGELOG.md | Documented the fixes to the set_workers functionality. |
Comments suppressed due to low confidence (2)
mkl_fft/tests/third_party/scipy/test_multithreading.py:56
- [nitpick] The slow test marker is currently commented out. Confirm that disabling this test is intentional, and if not, consider re-enabling it with proper configuration to ensure full test coverage.
# @pytest.mark.slow
mkl_fft/interfaces/_scipy_fft.py:103
- [nitpick] Replacing os.cpu_count() with mkl.get_max_threads() ensures consistency with the default worker behavior, but verify that this approach aligns with expected performance and behavior on systems where the two values might differ.
# SciPy uses os.cpu_count()
antonwolfy
reviewed
May 19, 2025
antonwolfy
approved these changes
May 19, 2025
Collaborator
antonwolfy
left a comment
There was a problem hiding this comment.
Thank you @vtavana, LGTM!
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.
resolves #177