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

workaround for enabling rvv #109

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

howjmay
Copy link
Contributor

@howjmay howjmay commented Oct 7, 2023

RVV has been supported since gcc-13. An option is added here to enable RISC-V vector extensions building, since gcc is not bumped to gcc-13 yet in toolchain

see

@howjmay howjmay marked this pull request as draft October 7, 2023 18:44
@howjmay howjmay force-pushed the enable-rvv branch 4 times, most recently from 779bcad to a3f46a7 Compare October 7, 2023 19:54
@howjmay howjmay marked this pull request as ready for review October 7, 2023 20:31
@fanghuaqi
Copy link

Hi @howjmay , gcc13 only support rvv intrinsic 0.11, see https://gcc.gnu.org/gcc-13/changes.html

If you want to use rvv intrinsic 0.12 which is almost nearly the v1.0 version, see riscv-non-isa/rvv-intrinsic-doc#241, you will need to use gcc master branch which is gcc 14 actively developed.

@howjmay
Copy link
Contributor Author

howjmay commented Oct 8, 2023

So it is better to bump the gcc version here from 13 to 14 or adding another option to install with gcc-14?

@robertlipe
Copy link
Contributor

Being so far behind the gun on GCC13, and with 14 adding so many features vital for C++ conformance (See http://gcc.gnu.org/gcc-14/changes.html ) but particularly RVV support which is a hot topic for our RISC-V devs - and likely to grow more now that production 1.0 silicon can (finally) be purchased in low-cost (~$40USD) dev boards (C908/K230) and SG2380 probably real in the next few months. C907 shouldn't be TOO far behind it.

After the turn of the calendar to 2024, GCC14 should enter "regressions only bugfixing" mode (stage4) mode.

I'd suggest that if we'd consider adding an optional developer "early preview" version in the near future that we base it on GCC14 instead of 13, which has been the 'official' collabortors version for a while now riscv-collab/riscv-gnu-toolchain@1d9d2ce and I think we got lost in merge noise riscv-collab/riscv-gnu-toolchain#1239

I haven't tried a build lately, but generally Stage 4 is a pretty quiet time as the trees are entering a stabilizing phase - one that we could help ensure lands safely for our MacOS devs.

OTOH, an upgrade to even 13.2 would be a big help if that's considered too risky. That would solve the OP. I suppose we have three real options:

  1. Refresh with the 13.2 generation, which would get us some fmt, c++23, and RVV1.
  2. Refresh with 14-development branch, which gets us more of all those.
  3. Wait another quarter or so for 14.0 and start then.

I'm not a homebrew dev, my days as a GCC maintainer are 20+ years ago, and I don't do Ruby, but if someone would like a hand/machine cycles and can give me a nickel tour of "this is how we do a homebrew build and this is our test/acceptance criteria", contact me at this name via gmail. I'm willing to help make it happen as I need G++ 14 anyway.

@sbeamer
Copy link
Collaborator

sbeamer commented Jan 11, 2024

@robertlipe this homebrew repo has been pretty lax as you can see. With a more sophisticated formula (build instructions), we could build arbitrary versions of gcc and the rest of the toolchain (#36). Thus far, I have taken the path of least resistance by taking whatever the riscv-gnu-toolchain repo provides. It sounds like when that crosses over to gcc 14, perhaps we can get rvv in here without too much fuss.

This repo so far has unfortunately never been able to support all use cases. As more RISC-V silicon becomes available, it may be worth reconsidering what are the most common use cases, and what is feasible to support via homebrew.

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

Successfully merging this pull request may close these issues.

4 participants