-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
gh-125022: add support for simple SIMD features detection #125011
Open
picnixz
wants to merge
27
commits into
python:main
Choose a base branch
from
picnixz:core/simd-helpers
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,343
−0
Conversation
This file contains 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
picnixz
commented
Oct 5, 2024
rruuaanng
reviewed
Oct 6, 2024
rruuaanng
reviewed
Oct 6, 2024
picnixz
force-pushed
the
core/simd-helpers
branch
from
October 6, 2024 09:20
b4de356
to
c33fb91
Compare
picnixz
force-pushed
the
core/simd-helpers
branch
from
October 6, 2024 09:24
c33fb91
to
3c0b4f1
Compare
picnixz
requested review from
a team,
erlend-aasland and
corona10
as code owners
October 6, 2024 09:49
picnixz
changed the title
Add support for simple SIMD features detection in autoconf (PoC)
gh-125022: add support for simple SIMD features detection (PoC)
Oct 6, 2024
picnixz
changed the title
gh-125022: add support for simple SIMD features detection (PoC)
gh-125022: add support for simple SIMD features detection
Oct 7, 2024
This comment was marked as resolved.
This comment was marked as resolved.
rruuaanng
reviewed
Oct 13, 2024
rruuaanng
reviewed
Oct 13, 2024
I think the updated flag declaration is really good. It’s just for improving readability and not for public exposure, which is awesome. |
picnixz
commented
Oct 27, 2024
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.
In #124951, there has been some initial discussion on improving the performances of base64 and possibly
{bytearray,bytes,str}.translate
using SIMD instructions.More generally, if we want to use specific SIMD instructions, it'd be good if we at least know whether we can use them or not. This PR is a PoC, experimental and (hence the skip news).
Note that the detection is essentially based on what was done in the blake2 module (though the flags being detected are different in this case but we can always add all those that are needed). To prepare for a harder detection of AVX instructions support, I added all the flags that are known to CPUID and possibly relevant. Note that more work needs to be done for a production use, especially in autoconf I think.
Note
The detection of a wider large family of CPUs (here we just assume Intel for simplicity and because we don't want to be overcomplicated for now) is still an ongoing work.
cc @gpshead