-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Loongarch: modify lsx optimization(25215PR) for newest branch, and add Qemu tests #27662
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
Conversation
Based on #25215, the latest branch code is adapted |
It's better to devide into multiple patches. |
I think the usage of |
23f84d0
to
f20fe1c
Compare
Add Linux Qemu tests for |
4254c5c
to
cb22dd3
Compare
Has been uniformly modified to loongarch64 |
4aab541
to
5ff4af2
Compare
Done |
Already added |
Sorry to bother you. How much longer will it take to merge this PR, or is there any additional work we need to do? |
Hi @XiWeiGu , Highway TL here. We are willing to merge a LoongSIMD patch and maintain it if it can be tested using a commonly available QEMU. Happy to discuss via issue on the Highway github. |
Thank you for your response. Currently, the cross-toolchain and QEMU for LoongArch are fully available. Further discussions on LoongArch support will be carried out on the Highway GitHub issue. |
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.
If I am not wrong, you are not building the source file with LSX optimizations. Could you also run benchmark numbers?
Also, there is an already an older PR #27402 which is converting this very source file to Highway. And since Highway doesn't support LoongArch just yet, we might want to prioritize getting Loongarch supported on highway.
I can run benchmarks, it support LSX on my test environment. |
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.
Thank you for your contribution! I have a few requests to enhance clarity and optimize the implementation. Please consider the following changes:
Considering that Highway supports general scalar instructions, I will submit a PR to Highway as soon as possible to add support for LoongArch, ensuring that PR (#27402) will not cause issues on the LoongArch platform once merged. |
Sounds good. It is a little involved to add a target: about 10 places require updating. It is quite doable by searching for all occurrences of say AVX3_ZEN4 (except in x86_*) and adding something there. If you prefer, I can also help by making this change, without actually adding any intrinsics. If so, what should be the name of the targets(s)? HWY_LSX? |
Thank you very much for your kind help; that would be best if possible. Yes, the target name will be HWY_LSX. Do you need any other information about LoongArch? |
bc79d35
to
874ea8e
Compare
You should not be working in your main branch. |
Thank you for your feedback. We will create a new branch to submit the code. |
:) I intend to add the new HWY_LSX target on Friday. |
The vector size of the LSX instruction set is 128 bits, while the vector size of the LASX instruction set is 256 bits. |
Got it. Highway supports this use case by compiling both LSX and LASX targets, and then dispatching to whichever is present. google/highway#2388 has the basics of this ready. |
Closing, replaced by #27856 |
replaced by #27856, Thank you everyone. |
No description provided.