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

[API Proposal]: Add AVX10v2 API to add Avx10.2 support #109083

Open
DeepakRajendrakumaran opened this issue Oct 21, 2024 · 1 comment
Open

[API Proposal]: Add AVX10v2 API to add Avx10.2 support #109083

DeepakRajendrakumaran opened this issue Oct 21, 2024 · 1 comment
Labels
api-suggestion Early API idea and discussion, it is NOT ready for implementation area-System.Runtime.Intrinsics untriaged New issue has not been triaged by the area owner

Comments

@DeepakRajendrakumaran
Copy link
Contributor

Background and motivation

Intel has announced the features available in the next version of Avx10 (10.2). In order to support this, .NET needs to expand the Avx10 library to include the new APIs.

Avx10.2 spec. Section 7 - 14 in this spec goes over the newly added instructions. A couple of interesting features here are MinMax and saturating conversions

As part of the original API Proposal, the proposed design was for future Avx10 versions to have their own classes which inherits from Avx10v1

API Proposal

namespace System.Runtime.Intrinsics.X86;

public abstract class Avx10v1 : Avx2
{
    ..........
}


class Avx10v2 : Avx10v1
{
    internal Avx10v2() { }

    public static new bool IsSupported { get => IsSupported; }

   // vminmaxps
    public static Vector128<float> MinMax(Vector128<float> left, Vector128<float> right, [ConstantExpected] byte control) => MinMax(left, right, table, control);

     public static Vector256<float> MinMax(Vector256<float> left, Vector256<float> right, [ConstantExpected] byte control) => MinMax(left, right, table, control);

<to be fleshed out>
    ............

   public abstract class V512 : Avx10v1.V512
  {

           internal V512() { }

            public static new bool IsSupported { get => IsSupported; }


         public static Vector512<float> MinMax(Vector512<float> left, Vector512<float> right, [ConstantExpected] byte control) => MinMax(left, right, table, control);

<to be fleshed out>
         ......................

  }
}

API Usage

Vector128<float> v1 = Vector512.Create((float)someParam1);
Vector128<float> v2 = Vector512.Create((float)someParam2);
if (Avx10v2.IsSupported()) {
  Vector128<float> v3 = Avx10v2.MinMax(v1, v2, 0b00000000);
  // etc
}

Alternative Designs

No response

Risks

No response

@DeepakRajendrakumaran DeepakRajendrakumaran added the api-suggestion Early API idea and discussion, it is NOT ready for implementation label Oct 21, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Oct 21, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-runtime-intrinsics
See info in area-owners.md if you want to be subscribed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-suggestion Early API idea and discussion, it is NOT ready for implementation area-System.Runtime.Intrinsics untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

No branches or pull requests

1 participant