Skip to content

Remove InstructionSet_VectorT256 if AVX2 is disabled via env var #89413

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

Merged
merged 1 commit into from
Jul 25, 2023

Conversation

EgorBo
Copy link
Member

@EgorBo EgorBo commented Jul 24, 2023

Fixes #89408

@ghost ghost added the area-VM-coreclr label Jul 24, 2023
@EgorBo EgorBo requested a review from tannergooding July 24, 2023 23:59
@ghost ghost assigned EgorBo Jul 24, 2023
@jkotas
Copy link
Member

jkotas commented Jul 25, 2023

Is it something that I have somehow regressed by #89342 or was this a pre-existing bug?

@EgorBo
Copy link
Member Author

EgorBo commented Jul 25, 2023

Is it something that I have somehow regressed by #89342 or was this a pre-existing bug?

Probably, although, the issue reproduces only on CLR (NAOT and R2R are fine) and only if the cpu physically supports AVX2 but it's disabled by the config

Copy link
Member

@tannergooding tannergooding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be good to have a test checking Vector<T>.IsHardwareAccelerated as well. I'm guessing we're missing that in CpuId.cs and are only checking the size instead

@jkotas
Copy link
Member

jkotas commented Jul 25, 2023

Probably, although, the issue reproduces only on CLR (NAOT and R2R are fine) and only if the cpu physically supports AVX2 but it's disabled by the config

Thank you for fixing it!

@EgorBo
Copy link
Member Author

EgorBo commented Jul 25, 2023

Might be good to have a test checking Vector<T>.IsHardwareAccelerated as well. I'm guessing we're missing that in CpuId.cs and are only checking the size instead

IsHardwareAccelerated didn't break, did it? The only way to test it is to use FILECHECK tests and check disasm - I'll think more about it as part of the quality week to improve test coverage for hw acceleration on asm level for SIMD crossplat APIs

@EgorBo EgorBo merged commit d1fc57e into dotnet:main Jul 25, 2023
@EgorBo EgorBo deleted the fix-SetCpuInfo branch July 25, 2023 08:20
@ghost ghost locked as resolved and limited conversation to collaborators Aug 24, 2023
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.

All Vector<T> operators use software fallbacks when AVX is not presented
3 participants