-
-
Notifications
You must be signed in to change notification settings - Fork 11k
ENH: Vectorize np.partition and np.argpartition using AVX-512 #24201
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
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
dddc046
Update submodule to latest
r-devulap 489acbb
Add benchmarks for np.partition
r-devulap 4a9ac25
ENH: Use avx512_qselect for np.partition
r-devulap 12ae67d
TST: Add tests for np.partition
r-devulap 234754d
BENCH: Add benchmarks for argpartition
r-devulap f3ac24b
Update x86-simd-sort submodule to latest
r-devulap d8643a4
get_partition_func does not need an extra argument
r-devulap 0c86047
ENH: Use avx512_argselect for np.argpartition
r-devulap 1a3caed
TST: add tests for np.argpartition
r-devulap 8e58998
Enable AVX-512 partition and argpartition on Windows
r-devulap 1999828
Move PyArray_PartitionFunc and PyArray_ArgPartitionFunc out of ndarra…
r-devulap c0bdd18
MAINT: Prevent re-definition of quickselect dispatch on ARM 32-bit
r-devulap ae33785
Avoid using template specializations for quickselect and argquicksele…
r-devulap cd9df94
Update submodule to latest
r-devulap 25a2efb
Update x86-simd-sort submodule to latest
r-devulap 29a9267
Update x86-simd-sort submodule to latest
r-devulap f3f6111
ifdef remove avx512 instantiations for CYGWIN
r-devulap fc5b215
Enable quicksort on WIN32
r-devulap 9d986f7
BUG: Fix compile error for avx512_qselect
r-devulap fcb6249
BUG: Fix qselect function declaration argument
r-devulap 6c1b8c7
Disable avx512_qselect on 32-bit systems
r-devulap cb176c1
Add may vary to output of np.partition and np.argpartition in docs
r-devulap 6cd06c0
Use np::Half instead of np_tag::npy_half::type
r-devulap File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
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.
Windows will never get the faster version?
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.
The quicksort patch ran into some problem with WIN32 builds and I never quite figured it out. Let me try running the partition patch through the CI, may be this one has better luck on windows.
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.
Looks like this one had no trouble. Windows will get the faster version too :) Might be worth checking if quicksort can be enabled, but will do it in a separate PR.
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.
It seems to work. Should we circle back to enabling AVX512 quicksort for windows?
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.
Yup, separate PR?
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.
Yes, sorry, separate PR would be good.
Uh oh!
There was an error while loading. Please reload this page.
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.
AVX512 quicksort, argsort, partition and argpartition are all enabled on windows (64-bit only though).