-
Notifications
You must be signed in to change notification settings - Fork 7
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
How to support fixed-size rvv intrinsic type in gcc ? #373
Comments
Sorry I can't understand your question totally. |
Sorry, maybe I didn't explain it clearly and give a incomplete example. May be you can test the following code,
Because the uint8x16_t is fixed-size in neon type system,so it can be a member in union or member, but vuint8x16_t can't. I found that it have been supported in gcc and clang in riscv-non-isa/rvv-intrinsic-doc#176. |
The optimized RISCV64 implementations for Neon in SIMDe use a fixed size
To use SIMDe in a similar manner as
And it is recommended to add Very recent GCC can also use fixed size rvv: |
If fixed size rvv, has been supported in the recent GCC/Clang, then I temporarily can't see the potential need for this feature. @zengdage @mr-c Do you guys know any case that we should support this feature. I think rvv still hasn't not reached the stable version yet. In the meantime, I am ok for a patch to support fixed size rvv now. Just I hope it could be a build option which we can turn it off in default with macro |
That's right, if the built option is detected the Neon types will be defined using the fixed RVV types, otherwise it will use the current sizeless types, no other changes. Just one setback, seems like the tuple types can't have a fixed size yet, opened topic at LLVM: llvm/llvm-project#88369 |
@OMaghiarIMG Thank you so much for the help! |
@OMaghiarIMG Will you do the fix? No rush, just curious. |
Yeah, worked on it a bit, the problem with the RVV tuple types, beside not supporting fixed-size, is that they are incompatible with Neon tuple type direct access - i.e. you can access a Neon int32x4x4_t using x.var[3], but this doesn't work for vint32m1x4_t.
The disadvantage is that now Neon2RVV must always be built with specifying fixed-RVV size, but I don't see any other way. |
I think only the tuple types is good. This way aligns to the neon way to implement tuples. It should be easy for other developers to understand the codebase. Thank you! |
Hi @howjmay ,I have a question about the neon intrinsic types convert into rvv intrinsic types. Can you help me with that ?
As I know,the neon intrinsic types are fixed-size,but rvv intrinsic types are sizeless. For example, the size of uint8x16_t (neon type) is 128 bits,and the size of vuint8m1_t (rvv type) is unkown, but you bind them together in neon2rvv.h.
I think it will make some errors in such scenario because the compiler need to allocate fixed-size stack memory space for vtmp.
The text was updated successfully, but these errors were encountered: