Skip to content

Enable AVX2 optimistically with AVX on NAOT #114575

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 4 commits into from
May 27, 2025

Conversation

saucecontrol
Copy link
Member

This resolves the last of the issues that prevented optimistic enablement of AVX2 (and dependent ISAs) when AVX is included in the NAOT --instruction-set list.

@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Apr 11, 2025
@saucecontrol
Copy link
Member Author

cc @tannergooding, thanks for talking this through with me. Changing getPreferredVectorByteLength() worked, but it does have the side effect of reducing the SIMD size for stack zeroing and cpyblk for AVX-only setups (diffs).

I don't know if it's worth introducing yet another vector size calculation method, but that's an option if we wanted to limit the change to only the Vector###.IsHardwareAccelerated JIT implementation.

@saucecontrol
Copy link
Member Author

saucecontrol commented Apr 12, 2025

Never mind... What I really wanted to do was make sure JIT never tried to return NI_IsSupported_Dynamic for IsHardwareAccelerated (which ILC doesn't even look for anyway). It's easier to just say "don't do that".

(no diffs now)

Copy link
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

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.

CC. @dotnet/jit-contrib, @EgorBo

@tannergooding tannergooding merged commit 50447b0 into dotnet:main May 27, 2025
117 of 119 checks passed
@saucecontrol saucecontrol deleted the naot-avx2 branch May 27, 2025 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

4 participants