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

Expose AVX512 variants of AVX, AVX2, and FMA instructions #85228

Merged
merged 12 commits into from
Apr 24, 2023

Conversation

tannergooding
Copy link
Member

This exposes 512-bit variants of all the relevant AVX, AVX2, and FMA instructions making progress towards completing:

@ghost ghost assigned tannergooding Apr 23, 2023
@dotnet-issue-labeler dotnet-issue-labeler bot added area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI new-api-needs-documentation labels Apr 23, 2023
@dotnet-issue-labeler
Copy link

Note regarding the new-api-needs-documentation label:

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.

@ghost
Copy link

ghost commented Apr 23, 2023

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

Issue Details

This exposes 512-bit variants of all the relevant AVX, AVX2, and FMA instructions making progress towards completing:

Author: tannergooding
Assignees: tannergooding
Labels:

area-CodeGen-coreclr, new-api-needs-documentation

Milestone: -

@BruceForstall BruceForstall added the avx512 Related to the AVX-512 architecture label Apr 24, 2023
RETAIL_CONFIG_DWORD_INFO(EXTERNAL_EnableAVX512DQ_VL, W("EnableAVX512DQ_VL"), 1, "Allows AVX512DQ_VL+ hardware intrinsics to be disabled")
RETAIL_CONFIG_DWORD_INFO(EXTERNAL_EnableAVX512F, W("EnableAVX512F"), 1, "Allows AVX512F+ hardware intrinsics to be disabled")
RETAIL_CONFIG_DWORD_INFO(EXTERNAL_EnableAVX512F_VL, W("EnableAVX512F_VL"), 1, "Allows AVX512F_VL+ hardware intrinsics to be disabled")
RETAIL_CONFIG_DWORD_INFO(EXTERNAL_EnableAVX512_VBMI, W("EnableAVX512_VBMI"), 1, "Allows AVX512_VBMI+ hardware intrinsics to be disabled")
Copy link
Member Author

Choose a reason for hiding this comment

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

I recommend viewing with hide whitespace: https://github.com/dotnet/runtime/pull/85228/files?diff=split&w=1

We tend to keep a lot of the columns aligned for various files, so when one column needs to expand we get whitespace changes that detract from the real changes.

Comment on lines +9791 to +9795
if (IsXMMReg(reg))
{
return emitZMMregName(reg);
}
break;
Copy link
Member Author

@tannergooding tannergooding Apr 24, 2023

Choose a reason for hiding this comment

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

While we would ideally pass in the "correct" attribute all the time, we have a number of instructions where that doesn't happen and where we end up with things like xrdx or yrdx.

Doing the IsXMMReg(reg) check at least ensures we don't do that and simply get edx/rdx instead for general purpose registers. This helps fix a number of diffs that were printing slightly incorrectly and gives us an easier way to identify operands with the "wrong" attribute size being passed in for anyone interested in cleaning things up for a future PR.

@tannergooding tannergooding marked this pull request as ready for review April 24, 2023 14:17
@tannergooding
Copy link
Member Author

tannergooding commented Apr 24, 2023

CC. @dotnet/jit-contrib, @dotnet/avx512-contrib

As with the last change, most of this is simply updating entries in the JIT intrinsic tables and exposing the managed side + xml docs.

Copy link
Member

@EgorBo EgorBo left a comment

Choose a reason for hiding this comment

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

LGTM

@tannergooding tannergooding merged commit 5d186d9 into dotnet:main Apr 24, 2023
@tannergooding tannergooding deleted the avx512-3 branch April 24, 2023 18:08
@tannergooding
Copy link
Member Author

SPMI collection job was kicked off.

@ghost ghost locked as resolved and limited conversation to collaborators May 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI avx512 Related to the AVX-512 architecture new-api-needs-documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants