-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[RISC-V] Detect Zba & Zbb extensions #113676
Conversation
993ce36 is being scheduled for building and testingGIT: |
src/coreclr/tools/Common/Internal/Runtime/ReadyToRunInstructionSet.cs
Outdated
Show resolved
Hide resolved
Tagging subscribers to this area: @mangod9 |
We typically add detection of processor extensions as needed - as part of the work to take advantage of the extension in the codegen. What are the extensions that you plan to take advantage of in near future? I would only add those. |
Hi @jkotas , I would like to take advantage of For the I, M, A, F, D extensions, they are already used inside the code. Currently we are assuming all of them are available. With my PR, if any of them are not available, an error would be emitted. So, I think it would be best to keep them in this PR? For the V extension, I personally don't have a plan to take advantage of it in the near future, but maybe @tomeksowi have an opinion on this? |
Our baseline is riscv64gc, so Similarly on x64, SSE2 is implied. |
I assume that the runtime C/C++ code takes advantage of these extensions too. Is the runtime going to be able to bootstrap to print this error if any of these baseline extensions are missing? |
Is there a way to tell the Linux loader to enforce the baseline at binary level? Ideally, the binary would fail to launch when the processor does not support the extensions that it depends on. |
Yes, I would only add the ones you plan to use in near future. |
We plan to support "V", many RVA22 processors implement it as an option and it will be mandatory since RVA23. Probably not near future, there's still a lot of work with the base and RVA22-mandatory extensions and the "V" dev itself looks huge. |
993ce36
to
fb3881a
Compare
RISC-V Release-FX-VF2: 0 / 258 (0.00%)
Build information and commandsGIT: RISC-V Release-CLR-VF2: 9469 / 9545 (99.20%)
Release-CLR-VF2.md, Release-CLR-VF2.xml, testclr_output.tar.gz Build information and commandsGIT: RISC-V Release-CLR-QEMU: 9469 / 9545 (99.20%)
Release-CLR-QEMU.md, Release-CLR-QEMU.xml, testclr_output.tar.gz Build information and commandsGIT: RISC-V Release-FX-QEMU: 0 / 258 (0.00%)
Release-FX-QEMU.md, Release-FX-QEMU.xml, testfx_output.tar.gz Build information and commandsGIT: |
RISC-V Release-FX-VF2: 0 / 258 (0.00%)
Build information and commandsGIT: RISC-V Release-CLR-VF2: 9469 / 9545 (99.20%)
Release-CLR-VF2.md, Release-CLR-VF2.xml, testclr_output.tar.gz Build information and commandsGIT: RISC-V Release-CLR-QEMU: 9469 / 9545 (99.20%)
Release-CLR-QEMU.md, Release-CLR-QEMU.xml, testclr_output.tar.gz Build information and commandsGIT: RISC-V Release-FX-QEMU: 0 / 258 (0.00%)
Release-FX-QEMU.md, Release-FX-QEMU.xml, testfx_output.tar.gz Build information and commandsGIT: |
RISC-V Release-FX-VF2: 0 / 258 (0.00%)
Build information and commandsGIT: |
RISC-V Release-FX-VF2: 0 / 258 (0.00%)
Build information and commandsGIT: RISC-V Release-CLR-VF2: 9524 / 9544 (99.79%)
Release-CLR-VF2.md, Release-CLR-VF2.xml, testclr_output.tar.gz Build information and commandsGIT: RISC-V Release-CLR-QEMU: 9524 / 9544 (99.79%)
Release-CLR-QEMU.md, Release-CLR-QEMU.xml, testclr_output.tar.gz Build information and commandsGIT: RISC-V Release-FX-QEMU: 640088 / 673778 (95.00%)
Release-FX-QEMU.md, Release-FX-QEMU.xml, testfx_output.tar.gz Build information and commandsGIT: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
658410a is being scheduled for building and testingGIT: |
There are merge conflicts. Aside: risc-vv CI could also use the same mechanism as .NET CI: merge main to PR branch before building (and thereby fail the build if there were merge conflicts). |
658410a
to
d81d1ee
Compare
RISC-V Release-CLR-VF2: 9524 / 9544 (99.79%)
Release-CLR-VF2.md, Release-CLR-VF2.xml, testclr_output.tar.gz Build information and commandsGIT: RISC-V Release-FX-QEMU: 660097 / 687914 (95.96%)
Release-FX-QEMU.md, Release-FX-QEMU.xml, testfx_output.tar.gz Build information and commandsGIT: RISC-V Release-FX-VF2: 435202 / 463916 (93.81%)
Build information and commandsGIT: RISC-V Release-CLR-QEMU: 9524 / 9544 (99.79%)
Release-CLR-QEMU.md, Release-CLR-QEMU.xml, testclr_output.tar.gz Build information and commandsGIT: |
cc @dotnet/jit-contrib for additional feedback |
RISC-V Release-CLR-VF2: 9524 / 9544 (99.79%)
Release-CLR-VF2.md, Release-CLR-VF2.xml, testclr_output.tar.gz Build information and commandsGIT: RISC-V Release-CLR-QEMU: 9524 / 9544 (99.79%)
Release-CLR-QEMU.md, Release-CLR-QEMU.xml, testclr_output.tar.gz Build information and commandsGIT: RISC-V Release-FX-VF2: 456184 / 494807 (92.19%)
Build information and commandsGIT: RISC-V Release-FX-QEMU: 641735 / 677513 (94.72%)
Release-FX-QEMU.md, Release-FX-QEMU.xml, testfx_output.tar.gz Build information and commandsGIT: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
In this PR, support for
single letter extensions (M, A, F, C, V), and "B"Zba & Zbb extension detection was added. Extensions are detected withhwprobe
,or if not available, with.hwcap
Additionally,
compOpportunisticallyDependsOn
was enabled for RISC-V.Part of #84834, cc @dotnet/samsung