Skip to content
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

Compiling for RISC-V? #1181

Closed
727yubin opened this issue May 13, 2024 · 1 comment
Closed

Compiling for RISC-V? #1181

727yubin opened this issue May 13, 2024 · 1 comment

Comments

@727yubin
Copy link

Version 0.8.2 introduced support for RISC-V vector extensions, and I'm excited to try them out!

I'm pretty sure it's a stupid question, but what header file should I include to compile programs for RISC-V?

Looking at the commit history, I've tried including arm/neon.h but it seems like that's not the right way...
I've successfully built tests for RISC-V with the GCC toolchain though, by referring to the actions CI tab.

@727yubin 727yubin changed the title Building tests and compiling for RISC-V? Compiling for RISC-V? May 13, 2024
@mr-c
Copy link
Collaborator

mr-c commented May 14, 2024

Hello @727yubin , did you https://github.com/simd-everywhere/simde?tab=readme-ov-file#usage ?

Or https://wiki.debian.org/SIMDEverywhere for how we adapt existing codebases in Debian to use SIMDe?

We do have an open issue to improve our RISC-V documentation: #1145

For hints on compile options, see our CI configuration (but remove the qemu parts if you have real hardware)

clang-qemu-rvv:

Which uses files like https://github.com/simd-everywhere/simde/blob/f046ab773733f09edaadec30345b592dfe85368e/docker/cross-files/riscv64%2Brvv_vlen128_elen64_zvfh-clang-17-ccache.cross

Another way to test out SIMDe could be to compile an existing program that already uses it: https://github.com/simd-everywhere/simde/wiki/Projects-Using-SIMDe (though some of them may not have updated to the latest SIMDe version yet)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants