Add LoongArch64 support - #1402
Conversation
|
Thanks for the PR. Before going forward: if no CI is setup for this, we cannot maintain that contribution. Can you make the extra step? Once CI is setup, I'll have a look at the actual implementation ;-) |
|
Thank you for your reply. I have submitted CI; please review it. |
|
While I'm reviewing it, can you give us some context? Why are you adding loongArch64 support xsimd? Are you planning to use it for some project? And more important to us, do you feel you can provide some support in maintaining that arch with xsimd? |
|
From a high level perspective: it seems to me we should have two different arch, lsx and lasx, maybe with lasx depending from lsx. Much like avx-family depends from sse-family. |
|
Thanks for the feedback! lsx and lasx are already two distinct arch types with two separate testing setups. But the LASX ⊃ LSX superset relationship was not reflected in the type hierarchy. I've addressed this in the latest commit by making lasx derive from lsx. |
|
This came up while porting Milvus to LoongArch64, since Milvus depends on xsimd. The current Milvus release doesn't need a newer xsimd (it's still pinned to 9.0.1), but without upstream support the dependency chain stays blocked on LoongArch even after future upgrades. So the main goal is to unblock that dependency chain — for Milvus, and more broadly for any project that wants to run on LoongArch. On maintenance: yes, I can provide support, on a best-effort basis — this isn't my full-time focus, so my response time may vary. |
The LoongArch architecture (LoongArch) is an Instruction Set Architecture (ISA) that has a RISC style.
Documentations:
ISA:
https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html
ABI:
https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-EN.html
More docs can be found at:
https://loongson.github.io/LoongArch-Documentation/README-EN.html
Tested natively on a LoongArch64 machine.
LSX
Build flags: -mlsx
Result:
[doctest] test cases: 409 | 409 passed | 0 failed | 0 skipped
[doctest] assertions: 5976 | 5976 passed | 0 failed
[doctest] Status: SUCCESS!
LASX
Build flags: -mlasx
[doctest] test cases: 409 | 409 passed | 0 failed | 0 skipped
[doctest] assertions: 7912 | 7912 passed | 0 failed
[doctest] Status: SUCCESS!