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

[mono][llvm] Disable simd intrinsics when we might be interoping between jit and llvmaot #74797

Merged
merged 1 commit into from
Sep 8, 2022

Conversation

BrzVlad
Copy link
Member

@BrzVlad BrzVlad commented Aug 30, 2022

Revert previous partial disabling of simd intrinsics.

If we have a method that checkes if some hardware functionality IsSupported and then calls another method making use of this functionality if so, we have a problem if the method using the actual intrinsic is not also aot compiled and the intrisic is not supported by the jit. This issue is exposed inside bcl code, where this pattern is very common, by use of profiled aot on android. This change goes for the most conservative approach, by disabling all simd if we are not fullaot-ing and we use llvm.

@BrzVlad
Copy link
Member Author

BrzVlad commented Aug 30, 2022

Note that @fanyang-mono's previous change (enabled on amd64 where I tested) was enough to run the test suite where I was encountering simd related issues. On a debug build it was still failing however due to more explicit debug asserts in the bcl. I'm not sure if there is a justification to risk it, since behavior can keep changing with aot profiles AFAIK, and we can come up with a more detailed plan for .net 8, in order to facilitate support of all intrinsics on aot (probably still with some compromises). This change might still be overly conservative. What do you guys think @fanyang-mono @vargaz @lambdageek

@lambdageek
Copy link
Member

@BrzVlad @vargaz I started a discussion about some different options for net8 for the SIMD intrinsics over in #74587 (comment)

…en jit and llvmaot

Revert previous partial disabling of simd intrinsics.

If we have a method that checkes if some hardware functionality `IsSupported` and then calls another method making use of this functionality if so, we have a problem if the method using the actual intrinsic is not also aot compiled and the intrisic is not supported by the jit. This issue is exposed inside bcl code, where this pattern is very common, by use of profiled aot on android. This change goes for the most conservative approach, by disabling all simd if we are not fullaot-ing and we use llvm.
@BrzVlad
Copy link
Member Author

BrzVlad commented Sep 7, 2022

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@BrzVlad BrzVlad merged commit c3ccb8a into dotnet:main Sep 8, 2022
@SamMonoRT
Copy link
Member

/backport to release/7.0

@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2022

Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/3015062050

BrzVlad added a commit to BrzVlad/runtime that referenced this pull request Sep 13, 2022
BrzVlad added a commit that referenced this pull request Sep 13, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Oct 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants