Open DeepakRajendrakumaran opened 4 months ago
@dotnet/avx512-contrib
Tagging subscribers to this area: @dotnet/area-system-runtime-intrinsics See info in area-owners.md if you want to be subscribed.
Author: | DeepakRajendrakumaran |
---|---|
Assignees: | - |
Labels: | `api-suggestion`, `area-System.Runtime.Intrinsics`, `untriaged`, `arch-avx512` |
Milestone: | - |
What's the relationship with the AVX512.VL version? The mentioned instruction names are same.
I assume they are indicated by different feature flags as AVX512.VL requires 512 bit and more register support.
Yes, different feature flags and encodings. Avx512Ifma.VL
is 128-bit and 256-bit EVEX encoded.
AvxIfma
is 128-bit and 256-bit VEX encoded support. A given CPU might support one, both, or neither.
addend
, left
, and right
namespace System.Runtime.Intrinsics.X86
{
public abstract class AvxIfma : Avx2
{
public static new bool IsSupported { get; }
public static Vector128<ulong> MultiplyAdd52Low(Vector128<ulong> addend, Vector128<ulong> left, Vector128<ulong> right);
public static Vector128<ulong> MultiplyAdd52High(Vector128<ulong> addend, Vector128<ulong> left, Vector128<ulong> right);
public static Vector256<ulong> MultiplyAdd52Low(Vector256<ulong> addend, Vector256<ulong> left, Vector256<ulong> right);
public static Vector256<ulong> MultiplyAdd52High(Vector256<ulong> addend, Vector256<ulong> left, Vector256<ulong> right);
public new abstract class X64 : Avx2.X64
{
public static new bool IsSupported { get; }
}
}
}
Background and motivation
The upcoming Intel® Sierra Forest, Grand Ridge, Arrow Lake, Lunar Lake will introduce AVX-IFMA instruction set architecture which provides VEX-encoded versions of following Instructions
VPMADD52HUQ
—Packed Multiply of Unsigned 52-Bit Integers and Add the High 52-Bit Products to Qword AccumulatorsVPMADD52LUQ
—Packed Multiply of Unsigned 52-Bit Integers and Add the Low 52-Bit Products to Qword AccumulatorsReference: https://www.intel.com/content/www/us/en/content-details/812218/intel-architecture-instruction-set-extensions-programming-reference.html .
This proposal aims to expose AVX-IFMA instructions via intrinsics.
Note: A public proposal exists already for AVX-512 IFMA(https://github.com/dotnet/runtime/issues/96476)
API Proposal
API Usage
Alternative Designs
No response
Risks
No response