howjmay / neon2rvv

A translator from ARM NEON intrinsics to RISCV-V Extension implementation
MIT License
23 stars 7 forks source link

Consider merging with SIMDe? #50

Open mr-c opened 1 year ago

mr-c commented 1 year ago

We'd love to have you participate!

Bonus, we already have lots of test cases and implementations for other archs and ISAs

https://github.com/simd-everywhere/simde/issues/1087

howjmay commented 1 year ago

Hi @mr-c I am appreciate. I am curious about what exactly is the merging you mentioned? Does it mean moving the whole codebase under SIMDe or just import it in someway?

The current version of neon2rvv is far from stable yet. If I wish to do fast iteration, then staying in a independent repo would make things easier. And the current toolchain using in this repo is a weekly built release by myself. https://github.com/howjmay/prebuilt-riscv-spike/releases/tag/latest It is not a stable official version.

It would be great to know more details, and find a way to cooperate. However, in this moment has an independent repo may help me develop faster.

mr-c commented 1 year ago

The existing code will need to be adapted to the SIMDe way.

For example, https://github.com/howjmay/neon2rvv/blob/84c6f941bb219142a0092e81b04a8641bff5ed92/neon2rvv.h#L160 would be added to https://github.com/simd-everywhere/simde/blob/c877fe596198b9df22d9cef7416e80ae30f0489c/simde/arm/neon/add.h#L486-L513

with something like

#elif defined(SIMDE_RISCV64_RVV_NATIVE)
  r_.vint8m1 =  __riscv_vadd_vv_i8m1(a_.vint8m1, b_.vint8m1, 16);

And would be tested by the existing test: https://github.com/simd-everywhere/simde/blob/c877fe596198b9df22d9cef7416e80ae30f0489c/test/arm/neon/add.c#L845-L911

But first we'd need to add the RVV native types to the simde_*_private types: https://github.com/simd-everywhere/simde/blob/c877fe596198b9df22d9cef7416e80ae30f0489c/simde/arm/neon/types.h#L474-L484

#elif defined(SIMDE_RISCV64_RVV_NATIVE)
  typedef  vint8m1_t  simde_int8x16_t;

And https://github.com/simd-everywhere/simde/blob/c877fe596198b9df22d9cef7416e80ae30f0489c/simde/arm/neon/types.h#L136-L150

#elif defined(SIMDE_RISCV64_RVV_NATIVE)
  vint8m1_t vint8m1;
mr-c commented 1 year ago

However, in this moment has an independent repo may help me develop faster.

And that is great! We are ready for you when you are; no rush :-)

howjmay commented 11 months ago

Hey @mr-c I have finished about 90% of the intrinsics. I think I may be able to process some of the steps to merge to SIMDe. But in the meantime I will develop sse2rvv too. Do you think SIMDe needs that part?

howjmay commented 10 months ago

My another repo which solves the translation between see and rvv has covered around 35% of the intrinsics

https://github.com/howjmay/sse2rvv

mr-c commented 9 months ago

Hello @howjmay ; could you review https://github.com/simd-everywhere/simde/pull/1130 and compare that with your approach?

howjmay commented 9 months ago

Let me try! That is a huge PR 😆