-
Notifications
You must be signed in to change notification settings - Fork 794
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
feat(xxhash3): Support LASX instruction set and refactor LSX implement #996
Conversation
24bit-xjkp
commented
Jan 12, 2025
- Use __lsx_vmul_d dircetly instead of using 2 32-bit multiply to emulate a 64-bit multiply.
- Add LASX support.
1. Use __lsx_vmul_d dircetly instead of using 2 32-bit multiply to emulate a 64-bit multiply. 2. Add LASX support.
LSX:
LASX:
|
The benchmark of previous implement for LSX is in #981. |
xxhash.h
Outdated
@@ -1125,6 +1125,7 @@ XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH64_hashFromCanonical(XXH_NOESCAPE const | |||
# define XXH_VSX 5 /*!< VSX and ZVector for POWER8/z13 (64-bit) */ | |||
# define XXH_SVE 6 /*!< SVE for some ARMv8-A and ARMv9-A */ | |||
# define XXH_LSX 7 /*!< LSX (128-bit SIMD) for LoongArch64 */ | |||
# define XXH_LASX 8 /*!< LASX (256-bit SIMD) for LoongArch64 */ |
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.
minor nit: alignment
Great work @24bit-xjkp ! I mostly have some comments to make sure the context is well understood.
Also a request :
It would be great to have an indication of which mode ( The display logic is mostly there : https://github.com/Cyan4973/xxHash/blob/dev/cli/xsum_arch.h#L165 |
I have added the SIMD extension we used to the welcome message.
Yes, I just fix the improper use of 32-bit multiply since LSX and LASX can execute a 64-bit multiply as fast as a 32-bit multiply. This also slightly reduces the size of binary. |
… LoongArch 1. Display the mode which is used as below: "loongarch64 + lasx" -> LoongArch64 platform with LoongArch Advanced SIMD Extension "loongarch64 + lsx" -> LoongArch64 platform with LoongArch SIMD Extension "loongarch64" -> LoongArch64 platform, use scalar implement 2. Align the define in xxhash.h
Shall we merge this pr? |
Yes! |