Skip to content

[API Proposal]: Revisit Avx10v2.V512 decision #113757

Closed as not planned
Closed as not planned
@colejohnson66

Description

@colejohnson66

Background and motivation

Intel has recently backtracked on their "512-bit is optional" decision for AVX10.2. Likely because AMD forced their hand. In other words, going forward, all "E" cores on AVX10.2 chips will support 512-bit vectors.

Given this, the Avx10v2.V512 class from #109083 should be subsumed up into the base Avx10v2 class.

API Proposal

Delete Avx10v2.V512 (and nested Avx10v2.V512.X64) classes, then move the Avx10v2.V512 methods up into Avx10v2:

namespace System.Runtime.Intrinsics.X86;

public abstract class Avx10v2 : Avx10v1
{
    // VMINMAXPD zmm1{k1}{z}, zmm2, zmm3/m512/m64bcst {sae}, imm8
    public static Vector512<double> MinMax(Vector512<double> left, Vector512<double> right, [ConstantExpected] byte control) => MinMax(left, right, mode);

    // VMINMAXPS zmm1{k1}{z}, zmm2, zmm3/m512/m32bcst {sae}, imm8
    public static Vector512<float> MinMax(Vector512<float> left, Vector512<float> right, [ConstantExpected] byte control) => MinMax(left, right, mode);

    // VCVTPS2IBS zmm1{k1}{z}, zmm2/m512/m32bcst {er}
    public static Vector512<int> ConvertToByteWithSaturationAndWidenToInt32(Vector512<float> value) => ConvertToByteWithSaturationAndWidenToInt32(value);

    // VCVTPS2IBS zmm1{k1}{z}, zmm2/m512/m32bcst {er}
    public static Vector512<int> ConvertToByteWithSaturationAndWidenToInt32(Vector512<float> value, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) => ConvertToByteWithSaturationAndWidenToInt32(value, mode);

    // VCVTPS2IUBS zmm1{k1}{z}, zmm2/m512/m32bcst {er}
    public static Vector512<uint> ConvertToByteWithSaturationAndWidenToUInt32(Vector512<float> value) => ConvertToByteWithSaturationAndWidenToUInt32(value);

    // VCVTPS2IUBS zmm1{k1}{z}, zmm2/m512/m32bcst {er}
    public static Vector512<uint> ConvertToByteWithSaturationAndWidenToUInt32(Vector512<float> value, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) => ConvertToByteWithSaturationAndWidenToUInt32(value, mode);

    // VCVTTPS2IUBS zmm1{k1}{z}, zmm2/m512/m32bcst {sae}
    public static Vector512<int> ConvertToByteWithTruncatedSaturationAndWidenToInt32(Vector512<float> value) => ConvertToByteWithTruncatedSaturationAndWidenToInt32(value);

    // VCVTTPS2IUBS zmm1{k1}{z}, zmm2/m512/m32bcst {sae}
    public static Vector512<uint> ConvertToByteWithTruncatedSaturationAndWidenToUInt32(Vector512<float> value) => ConvertToByteWithTruncatedSaturationAndWidenToUInt32(value);

    // VMPSADBW zmm1{k1}{z}, zmm2, zmm3/m512, imm8
    public static Vector512<ushort> MultipleSumAbsoluteDifferences(Vector512<byte> left, Vector512<byte> right, [ConstantExpected] byte mask) => MultipleSumAbsoluteDifferences(left, right, mask);
}

API Usage

No response

Alternative Designs

No response

Risks

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    api-suggestionEarly API idea and discussion, it is NOT ready for implementationarea-System.Runtime.Intrinsicsavx10Related to the AVX10 architectureneeds-further-triageIssue has been initially triaged, but needs deeper consideration or reconsideration

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions