Configure.cmake: improve RVV1 check #602
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To test for RVV1 support, we currently run a small program that uses some vector intrinsics from the v0.11.x draft of the RVV standard. The library itself however needs newer intrinsics than the ones that we test for. This can lead to a problem because GCC 13 supports the intrinsics that we test for, but not (all of) the ones we intend to use. In short, the build can fail with GCC 13: #579
This commit changes the detection mechanism. Instead of compiling a program that makes use of the intrinsics, we now just check the two values,
__riscv_v
and__riscv_v_intrinsic
, to ensure that we have version 1.0 of RVV and version 0.12 of the intrinsics. According to the intrinsics spec, https://github.com/riscv-non-isa/rvv-intrinsic-doc, these are the stable versions.