-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Add Sve.IsSupported support #97814
Add Sve.IsSupported support #97814
Conversation
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
Tagging subscribers to this area: @dotnet/area-system-runtime-intrinsics Issue DetailsAdd the SVE API, but it only includes the IsSupported method. Add the blank test files to go along with it
|
This is cut from #97695 I'm still a little confused about the testing. I can get the Also, what do I need to build+run to get For now, the new SVE block inside @kunalspathak @dotnet/arm64-contrib @tannergooding |
The general process for tests is going to be:
|
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.
@tannergooding - are there other places where we should set the bits for IsSupported
or this should be good enough?
src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs
Outdated
Show resolved
Hide resolved
src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs
Show resolved
Hide resolved
Diff results for #97814Throughput diffsThroughput diffs for linux/arm64 ran on windows/x64MinOpts (-0.01% to +0.00%)
Throughput diffs for windows/arm64 ran on windows/x64MinOpts (-0.00% to +0.01%)
Details here |
Test results on SVE enabled machine running HardwareIntrinsics_Arm_r.sh:
|
I'm not sure how to fix this in the PR. |
there were few missing places. my changes should fix it. |
@fanyang-mono - how can we verify if this returns |
@kunalspathak The change I suggested here is needed, in order for Mono to return Once this change is in place, you could build mono and write a small program to call |
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. Thanks!
...braries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.PlatformNotSupported.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.cs
Outdated
Show resolved
Hide resolved
src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs
Show resolved
Hide resolved
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.
The changes in general LGTM, but the Sve.PlatformNotSupported.cs file in particular needs to follow the correct pattern.
...braries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.PlatformNotSupported.cs
Show resolved
Hide resolved
...braries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.PlatformNotSupported.cs
Outdated
Show resolved
Hide resolved
Diff results for #97814Throughput diffsThroughput diffs for linux/arm64 ran on windows/x64MinOpts (-0.01% to +0.00%)
Throughput diffs for windows/arm64 ran on windows/x64MinOpts (-0.00% to +0.01%)
Details here |
It just occurred to me that this should return |
Shouldn't that already fall out from the VM support? |
We set it for Unix here: https://github.com/dotnet/runtime/blob/main/src/native/minipal/cpufeatures.c#L362-L363 and never set it for Windows, as no way to check the API exists yet: |
perfect. Thanks for confirming. |
Add the SVE API, but it only includes the IsSupported method.
Add the blank test files to go along with it