-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[libs] Skip AdvSimdEncode on Mono #96829
Merged
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e7e9f95
[libs] Skip AdvSimdEncode on Mono
mdh1418 7dbdc18
Add guard around existing AdvSimdEncode callsite to exclude on Mono
mdh1418 b9556d0
Add issue to guard
mdh1418 a49d8b0
Guard AdvSimdEncode logic for not Mono
mdh1418 05c6acb
Make AdvSimdEncode inaccessible on Mono
mdh1418 8ab79aa
Update issue comment
mdh1418 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.
It is better to do this at the callsite of
AdvSimdEncod
.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.
I can add an extra guard to the current caller of AdvSimdEncode. I think the current callsite would just fall through to the next block of logic, so I didn't add it in the first place.
I think we should still have the block on AdvSimdEncode in case more invocations are added, because the PNSE is hit inside of AdvSimdEncode.
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.
hhm, wondering why this should be at the callsite rather than just inside
AdvSimdEncode
? Also can you add a comment about why this is under a#if !MONO
pointing to the #96828 (comment)?In caller, you could just have without
#else
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.
Because at the callsite, there is a check to see if AdvSimd is supported to decide to call
AdvSimdEncode
or not. So I feel logically, it makes more sense to do it there. Functional wise, either way should be fine.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.
point it to #93081
Right, but that is true even for Mono and should be ok. At least if there are more callers, we won't have to worry about adding the
#if
everywhere.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.
Updated to guard the entire method
I believe that Mono reporting
IsSupported
but functions not being supported might be attributed to #84510 not accounting for Mono. The volume of mono tests is far too time consuming + non-zero flakey tests to run on all PRs by default. Hence a runtime-extra-platforms lane was introduced, which was intended to be ran for PRs that make changes affecting Mono.There is a smoke test being ran by default, but that is just System.Runtime.Tests.csproj. We could increase the number of suites that are ran as smoke tests, but that is another question of what other suites should be added that reliably dont flake. It looks like there are HWIntrinsics runtime tests, but guessing it doesn't run for Mono?
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.
I don't think mono specific pipelines are run today if the changes are not related to mono.
runtime-extra-platforms
would be a good remainder to run for such cases. Regarding,IsSupported
, what is a good option here? Although logically correct to haveAdvSimd.IsSupported == false
until those APIs are not implemented in mono, but that would mean that mono won't have any of the other AdvSimd features too.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.
BCL change should trigger mono CI lanes which run library tests to run. If not, it is an issue worth looking into.
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.
Since these are new API's, I doubt the customer would use them right away. So I would prefer leaving
AdvSimd.IsSupported == true
as it is now and implement the new API's soon.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.
re: tests, I think this is a case where we didn't have adequate coverage in our smoke tests. The good thing is that we discovered it right away via extra-platforms and we can take action.
With us running a reduced set of tests for iOS devices (full aot LLVM), this is going to happen. As Mitch was getting at, my suggestion would be to add another suite to the smoke tests that we run so that there's a reasonable chance we would fail on something like this in the future.