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 various floating-point intrinsics for Avx512F and Avx512DQ #85716

Merged
merged 10 commits into from
May 4, 2023

Conversation

tannergooding
Copy link
Member

This exposes some instructions unique to the AVX512 family of instructions making progress towards completing:

There will be a separate PR to utilize some of these in our scalar math APIs. For example, vrange can be used to implement a faster/correct Max/MaxMagnitude/MaxNumber/MaxNumberMagnitude and Min/MinMagnitude/MinNumber/MinNumberMagnitude (where-as currently we can only accelerate on x86/x64 if one input is constant).

Likewise vfixup can be used to handle many complex branching conditions where various edge cases are being handled.

@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 May 3, 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 ghost assigned tannergooding May 3, 2023
@ghost
Copy link

ghost commented May 3, 2023

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

Issue Details

This exposes some instructions unique to the AVX512 family of instructions making progress towards completing:

There will be a separate PR to utilize some of these in our scalar math APIs. For example, vrange can be used to implement a faster/correct Max/MaxMagnitude/MaxNumber/MaxNumberMagnitude and Min/MinMagnitude/MinNumber/MinNumberMagnitude (where-as currently we can only accelerate on x86/x64 if one input is constant).

Likewise vfixup can be used to handle many complex branching conditions where various edge cases are being handled.

Author: tannergooding
Assignees: tannergooding
Labels:

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

Milestone: -

@tannergooding tannergooding added the avx512 Related to the AVX-512 architecture label May 3, 2023
@@ -534,21 +534,27 @@ struct HWIntrinsicInfo

case NI_SSE41_Ceiling:
case NI_SSE41_CeilingScalar:
case NI_AVX_Ceiling:
{
FALLTHROUGH;
Copy link
Member

Choose a reason for hiding this comment

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

nit: remove { FALLTHROUGH; }

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 had it split "explicitly" here to help visualize the groupings between Ceiling vs RoundToPositiveInfinity (and likewise Floor vs RoundToNegativeInfinity), particularly since Ceiling/Floor don't have AVX512 equivalents.

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 cb5fe56 into dotnet:main May 4, 2023
@tannergooding tannergooding deleted the avx512-4 branch May 4, 2023 02:44
@sebastienros
Copy link
Member

This PR is part of a regression I just filed: #85930
Based on the recent fix for AVX512 I assume it could be related, you know better.

@tannergooding
Copy link
Member Author

I wouldn't expect it, this was a zero spmi diffs change since it just added new APIs, it didn't update any existing paths to use them.

@ghost ghost locked as resolved and limited conversation to collaborators Jun 8, 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