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

Enable Arm64 RDM on Windows #109493

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

saucecontrol
Copy link
Member

@saucecontrol saucecontrol commented Nov 3, 2024

Fixes #39094

On Windows, we currently never enable RDM intrinsics because IsProcessorFeaturePresent does not have a flag for the Armv8.1 RDM optional extension. This results in Rdm.IsSupported returning different values on Windows vs Linux on the same hardware (realistically, anything newer than 2016).

I finally found enough documentation to support enabling RDM by implication. The docs for Armv8.1 extensions include the following:

FEAT_RDM is OPTIONAL from Armv8.0.
In an Armv8.1 implementation, if FEAT_AdvSIMD is implemented, FEAT_RDM is implemented.

Since we require a baseline of AdvSIMD support, we may assume that if we have an Armv8.1 processor, it has RDM support. This leads to a second problem, which is that there is also no IsProcessorFeaturePresent flag for Armv8.1 baseline. However, from the generic docs for Armv8 extensions:

An Armv8.x-A processor can implement any features from the next .x extension. However, it cannot implement features from
any .x extension after that.
For example, a processor described as implementing Armv8.1-A:
• Must implement all the mandatory features of Armv8.0-A and Armv8.1-A.
• Is permitted to implement some features from Armv8.2-A.
• Is not permitted to implement features from Armv8.3-A, Armv8.4-A, and so on

We may assume that the presence of any Armv8.2 optional feature means we have at least Armv8.1. And because IsProcessorFeaturePresent does have a flag for the Armv8.2 DP optional extension, we may safely assume that its presence also implies RDM.

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Nov 3, 2024
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Nov 3, 2024
@jkotas jkotas added arch-arm64 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-arm64 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[win-arm64] Update EEJitManager::SetCpuInfo in codeman.cpp to support ARMv8.1-RDMA and ARMv8.2-DotProd
2 participants