-
Notifications
You must be signed in to change notification settings - Fork 5.1k
[NO MERGE - FOR NET 11] Updating the managed baselines to x86-64-v2
and armv8-a + lse
#118101
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
base: main
Are you sure you want to change the base?
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
CC. @jkotas, @MichalStrehovsky I've put this up for early review/feedback so that when approved, it can go in as early as possible in .NET 11 and allow us to get the most feedback. There is likely still more cleanup possible; the initial PR here was focused on getting the bulk obvious cleanup/simplification done without looking deeper into possible refactorings. |
@dotnet/samsung Could you please take a look? These changes may be related to riscv64. |
For Arm64, we need to worry about Android too. Android baseline is not anywhere near including LSE as far as I can tell. We treat Android as a Linux flavor wrt codegen. If we start diverging codegen between Linux and Android, things will get more complicated. I think the x64 and Windows/macOS arm64 part of this change is fine, Linux Arm64 baseline should stay as is. |
👍, looks like even Android 16 still presumes 8.0-a. Do you think it is worth bumping Windows fully to We notably won't get any of the JIT simplifications for Arm64 while Linux still targets older. But it may improve the NAOT codegen, minimally. For Windows, just the LSE baseline would allow us to remove some of the branching or explicit barriers in various helpers. There's also the consideration for crossgen/ready-to-run. This has effectively targeted |
It is fine to bump the baseline up to the oldest supported Windows Arm64 hardware. Now, I am not sure what the oldest supported Windows Arm64 hardware is going to be for .NET 11. https://github.com/dotnet/core/blob/main/release-notes/10.0/supported-os.md#windows lists
I would check whether changing the baseline reduces number of JITed methods for a simple ASP.NET app. If it does by say 10 methods or more, I would say that it is worth it. We use R2R as first tier, so the number of JITed methods is what matters the most, the code quality does not matter as much. |
It looks to be Snapdragon 850 (armv8.2-a) and later (https://learn.microsoft.com/en-us/windows-hardware/design/minimum/supported/windows-10-1809-supported-qualcomm-processors). Only 1803 and earlier had support for the "1st gen" which was the Snapdraon 835 (armv8.0-a). This matches the internal thread we had last December (which covered requirements and recommendations from Arm SBSA). Formally per Arm SBSA, Win 11 22621+ (22H2) requires Given that, I'll leave it at just |
I get 8 methods difference for the
Namely the methods that use What remains being jitted is namely the |
…c with the new baseline
I think it is worth changing the default baseline for crossgen2 then. I assume that the default is overridable, and self-contained apps published with R2R can lower it. Is that right? |
Correct, the way it would work is essentially specifying There's probably some kind of "better" UX we could provide here, if that were desirable. For example, we might special-case |
We may want to keep the lower baseline for macOS x64 to avoid regressing emulation on Apple Silicon. |
Do x64 emulators on windows-arm64 and linux-arm64 support AVX so we don't need to do the same for them? |
Yes: https://winbuzzer.com/2024/11/07/windows-11-build-27744-expands-prism-emulator-for-arm-pcs-xcxwbn/
We do not support QEMU, but yes: https://www.phoronix.com/news/QEMU-7.2-Released |
This updates the baseline ISA targeted by NAOT and the JIT to more modern baselines, allowing a significant simplification of the logic.
This is setup in a staged manner to help reduce support and troubleshooting costs. Namely while it updates what the JIT and NAOT output defaults to, it doesn't update what the native code of the runtime itself is compiled against. This allows us to more readily output an appropriate warning that the hardware is out of support and why. We will be able to migrate the native side forward in a release or two and remove the error message at that time.
For xarch, the baseline is changing from
SSE2
(x86-64-v1
, an ~2004 baseline) toSSE4.2+POPCNT
(x86-64-v2
, an ~2008 baseline). The last CPUs that didn't providex86-64-v2
support were discontinued (went out of support) around 2013 (Bonnell microarchitecture, which was part of the Intel Atom lineup for low end machines). Windows 11 has correspondingly requiredSSE4.1
or later since at least 2021 (https://learn.microsoft.com/en-us/windows-hardware/design/minimum/minimum-hardware-requirements-overview).For Arm64, the baseline is changing from
armv8-a
(which includesneon
) to also includelse
(built-in atomics support). Such a feature is required on Windows (see the above doc) and on MacOS already.It would be possible to raise the baseline just for specific OS, but at the potential cost of an increased complexity in the testing matrix. We notably have this somewhat already as
MacOS
defaults toarmv8.5-a
, while Windows and Linux default toarmv8-a
. These new baselines are still low enough that we should wait on customer feedback before taking further considerations in this space. Most notably, raising the baseline Arm64 baseline on Linux to includeLSE
would drop support for the Raspberry Pi, which may be undesirable. -- For xarch, there aren't really many concerns about the newer baseline requirement with Windows 10 going out of supportOct 14, 2025
. Azure exclusively providesx86-64-v3
and later CPUs, as do most other major cloud providers. Likewise, resources likeSteam Hardware Survey
(https://store.steampowered.com/hwsurvey) show that 99.79% of reporting hardware supports the new baseline. It is expected that a very small percentage of client users on over decade old, out of support, CPUs might be impacted.