-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Open
Labels
3.14bugs and security fixesbugs and security fixes3.15new features, bugs and security fixesnew features, bugs and security fixesbuildThe build process and cross-buildThe build process and cross-buildextension-modulesC modules in the Modules dirC modules in the Modules dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
https://discuss.python.org/t/supporting-simd-on-aarch64-linux/94188/3
SIMD128 on linux arm64 is not good enough(same with the MacOS)
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
Metadata
Metadata
Assignees
Labels
3.14bugs and security fixesbugs and security fixes3.15new features, bugs and security fixesnew features, bugs and security fixesbuildThe build process and cross-buildThe build process and cross-buildextension-modulesC modules in the Modules dirC modules in the Modules dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
Milestone
Relationships
Development
Select code repository
Activity
pythongh-135032: Disable the SIMD128/SIMD256 for Linux arm64 explictly
picnixz commentedon Jun 2, 2025
As I said on the PR, please present benchmarks (I'd like to know how worse it is). And please do the same for SIMD-256 as results may be different (don't forget to build it using --enable-optimizations and --with-lto)
Zheaoli commentedon Jun 2, 2025
Thanks for the remind, I'm working on it(
[-]Disable the SIMD128/SIMD256 for Linux arm64 explictly[/-][+]Explicitly disable SIMD128/256 support for HACL* on aarch64-linux[/+]picnixz commentedon Jun 2, 2025
Since this is affecting BLAKE-2 and HMAC only, we only need to backport it until 3.14 as BLAKE-2 was not in 3.13 I think.
Zheaoli commentedon Jun 3, 2025
After test, The result is the same
This is the result with SIMD
And the result without SIMD
Zheaoli commentedon Jun 3, 2025
BTW, here's no SIMD-256 for aarch64 yet
Zheaoli commentedon Jun 3, 2025
All test on AWS m8g.2xlarge, https://instances.vantage.sh/aws/ec2/m8g.2xlarge
Zheaoli commentedon Jun 6, 2025
ping @picnixz ~
Zheaoli commentedon Jun 12, 2025
@picnixz PTAL when you got time
picnixz commentedon Jun 13, 2025
Please use pyperf instead of manual timeit. Also, keep out the encode call and consider using os.urandom(1024) as the string to hash. As it's a CSHF, the input being ascii or not shouldn't matter.
Zheaoli commentedon Jun 15, 2025
Seems I got some wrong bench before(lol