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

How to configure config to generate a cross toolchain that supports riscv extension vectors? #2005

Open
skychengzhixing opened this issue Aug 14, 2023 · 4 comments

Comments

@skychengzhixing
Copy link

hi,friend:
I want to use version 1.25.0 of Crosstool-ng to generate a cross toolchain that supports riscv extension vectors. How can I config for this?
Which options do I need to configure?
Looking forward to your reply!

@QBos07
Copy link
Contributor

QBos07 commented Aug 14, 2023

Looks like that gcc supports vector extensions out of the box and you can enable automatic vectorization by compiling with the -mrvv flag but please don't quote me on that since I just did a quick google search.

@QBos07
Copy link
Contributor

QBos07 commented Aug 14, 2023

Btw I recommend using ct-ng from master but 1.26 is near (see #1991). This is mostly due to some changed download paths.

@KirillSmirnov
Copy link
Contributor

It depends on a version of the vector extension. To the best of my knowledge, the only hardware implementation available for customers is rvv0.7. rvv1.0 is for qemu and other virtual environments only. Please, tell me if I am wrong!

If you are interested in rvv1.0, the latest gcc supports it out of the box, so you can just grab crosstool-ng master and build riscv64-unknown-linux-gnu (or other) sample. To use the extension just pass -march=....v option to gcc, for example, -march=rv64gcv. -mrvv flag won't work.
If you are interested in rvv0.7, the best way is use pre-built toolchain supplied by the vendor of your hardware.

@skychengzhixing
Copy link
Author

Thank you for your answers.
I have added the following options to the configuration, which currently appear to be effective, as follows:
CT_CC_GCC_EXTRA_CONFIG_ARRAY="--with-march=rv64gc --with-march=rv64gcv”.

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

3 participants