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

Ensure that the new Vector512 related ISAs are covered by ILLink Substitutions #83040

Merged
merged 2 commits into from
Mar 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
<type fullname="System.Runtime.Intrinsics.Vector256">
<method signature="System.Boolean get_IsHardwareAccelerated()" body="stub" value="false" />
</type>
<type fullname="System.Runtime.Intrinsics.Vector512">
<method signature="System.Boolean get_IsHardwareAccelerated()" body="stub" value="false" />
</type>
<type fullname="System.Runtime.Intrinsics.X86.Aes">
<method signature="System.Boolean get_IsSupported()" body="stub" value="false" />
</type>
Expand All @@ -21,6 +24,42 @@
<type fullname="System.Runtime.Intrinsics.X86.Avx2/X64">
<method signature="System.Boolean get_IsSupported()" body="stub" value="false" />
</type>
<type fullname="System.Runtime.Intrinsics.X86.Avx512BW">
Copy link
Member

@eerhardt eerhardt Mar 8, 2023

Choose a reason for hiding this comment

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

Why do we need ILLink.Substitution entries for these when we also have the .PlatformNotSupported.cs versions that just return false? This xml file seems to be included in the same condition as when those .cs files are used.

Copy link
Member Author

Choose a reason for hiding this comment

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

Unsure actually. Maybe some legacy thing from back when they weren't guaranteed false?

Copy link
Member

Choose a reason for hiding this comment

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

It looks like I originally did it in ee12b54, but looking back I'm not sure it is needed. Since we are just following existing convention here, let's not block this PR on it.

Copy link
Member Author

Choose a reason for hiding this comment

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

<method signature="System.Boolean get_IsSupported()" body="stub" value="false" />
</type>
<type fullname="System.Runtime.Intrinsics.X86.Avx512BW/VL">
<method signature="System.Boolean get_IsSupported()" body="stub" value="false" />
</type>
<type fullname="System.Runtime.Intrinsics.X86.Avx512BW/X64">
<method signature="System.Boolean get_IsSupported()" body="stub" value="false" />
</type>
<type fullname="System.Runtime.Intrinsics.X86.Avx512CD">
<method signature="System.Boolean get_IsSupported()" body="stub" value="false" />
</type>
<type fullname="System.Runtime.Intrinsics.X86.Avx512CD/VL">
<method signature="System.Boolean get_IsSupported()" body="stub" value="false" />
</type>
<type fullname="System.Runtime.Intrinsics.X86.Avx512CD/X64">
<method signature="System.Boolean get_IsSupported()" body="stub" value="false" />
</type>
<type fullname="System.Runtime.Intrinsics.X86.Avx512DQ">
<method signature="System.Boolean get_IsSupported()" body="stub" value="false" />
</type>
<type fullname="System.Runtime.Intrinsics.X86.Avx512DQ/VL">
<method signature="System.Boolean get_IsSupported()" body="stub" value="false" />
</type>
<type fullname="System.Runtime.Intrinsics.X86.Avx512DQ/X64">
<method signature="System.Boolean get_IsSupported()" body="stub" value="false" />
</type>
<type fullname="System.Runtime.Intrinsics.X86.Avx512F">
<method signature="System.Boolean get_IsSupported()" body="stub" value="false" />
</type>
<type fullname="System.Runtime.Intrinsics.X86.Avx512F/VL">
<method signature="System.Boolean get_IsSupported()" body="stub" value="false" />
</type>
<type fullname="System.Runtime.Intrinsics.X86.Avx512F/X64">
<method signature="System.Boolean get_IsSupported()" body="stub" value="false" />
</type>
<type fullname="System.Runtime.Intrinsics.X86.AvxVnni">
<method signature="System.Boolean get_IsSupported()" body="stub" value="false" />
</type>
Expand Down Expand Up @@ -111,6 +150,5 @@
<type fullname="System.Runtime.Intrinsics.X86.X86Serialize/X64">
<method signature="System.Boolean get_IsSupported()" body="stub" value="false" />
</type>

</assembly>
</linker>
Original file line number Diff line number Diff line change
Expand Up @@ -2422,6 +2422,10 @@
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\X86\Aes.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\X86\Avx.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\X86\Avx2.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\X86\Avx512BW.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\X86\Avx512CD.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\X86\Avx512DQ.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\X86\Avx512F.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\X86\AvxVnni.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\X86\Bmi1.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\X86\Bmi2.cs" />
Expand All @@ -2442,6 +2446,10 @@
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\X86\Aes.PlatformNotSupported.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\X86\Avx.PlatformNotSupported.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\X86\Avx2.PlatformNotSupported.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\X86\Avx512BW.PlatformNotSupported.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\X86\Avx512CD.PlatformNotSupported.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\X86\Avx512DQ.PlatformNotSupported.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\X86\Avx512F.PlatformNotSupported.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\X86\AvxVnni.PlatformNotSupported.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\X86\Bmi1.PlatformNotSupported.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\X86\Bmi2.PlatformNotSupported.cs" />
Expand Down Expand Up @@ -2574,4 +2582,4 @@
<Compile Include="$(MSBuildThisFileDirectory)System\Numerics\IUnaryPlusOperators.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Numerics\IUnsignedNumber.cs" />
</ItemGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.Intrinsics;

namespace System.Runtime.Intrinsics.X86
{
/// <summary>This class provides access to X86 AVX512BW hardware instructions via intrinsics</summary>
[CLSCompliant(false)]
public abstract class Avx512BW : Avx512F
{
internal Avx512BW() { }

public static new bool IsSupported { [Intrinsic] get { return false; } }

public new abstract class VL : Avx512F.VL
{
internal VL() { }

public static new bool IsSupported { [Intrinsic] get { return false; } }
}

public new abstract class X64 : Avx512F.X64
{
internal X64() { }

public static new bool IsSupported { [Intrinsic] get { return false; } }
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;

namespace System.Runtime.Intrinsics.X86
{
/// <summary>This class provides access to X86 AVX512BW hardware instructions via intrinsics</summary>
[Intrinsic]
[CLSCompliant(false)]
public abstract class Avx512BW : Avx512F
{
internal Avx512BW() { }

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

[Intrinsic]
public new abstract class VL : Avx512F.VL
Copy link
Member

Choose a reason for hiding this comment

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

Do the public nested types need doc comments?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, but it looks like "all" of them are currently missing for System.Runtime.Intrinsics.*.

I'll log an issue and gets this handled in a follow up PR later tonight.

Copy link
Member Author

Choose a reason for hiding this comment

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

{
internal VL() { }

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

[Intrinsic]
public new abstract class X64 : Avx512F.X64
{
internal X64() { }

public static new bool IsSupported { get => IsSupported; }
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.Intrinsics;

namespace System.Runtime.Intrinsics.X86
{
/// <summary>This class provides access to X86 AVX512CD hardware instructions via intrinsics</summary>
[CLSCompliant(false)]
public abstract class Avx512CD : Avx512F
{
internal Avx512CD() { }

public static new bool IsSupported { [Intrinsic] get { return false; } }

public new abstract class VL : Avx512F.VL
{
internal VL() { }

public static new bool IsSupported { [Intrinsic] get { return false; } }
}

public new abstract class X64 : Avx512F.X64
{
internal X64() { }

public static new bool IsSupported { [Intrinsic] get { return false; } }
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;

namespace System.Runtime.Intrinsics.X86
{
/// <summary>This class provides access to X86 AVX512CD hardware instructions via intrinsics</summary>
[Intrinsic]
[CLSCompliant(false)]
public abstract class Avx512CD : Avx512F
{
internal Avx512CD() { }

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

[Intrinsic]
public new abstract class VL : Avx512F.VL
{
internal VL() { }

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

[Intrinsic]
public new abstract class X64 : Avx512F.X64
{
internal X64() { }

public static new bool IsSupported { get => IsSupported; }
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.Intrinsics;

namespace System.Runtime.Intrinsics.X86
{
/// <summary>This class provides access to X86 AVX512DQ hardware instructions via intrinsics</summary>
[CLSCompliant(false)]
public abstract class Avx512DQ : Avx512F
{
internal Avx512DQ() { }

public static new bool IsSupported { [Intrinsic] get { return false; } }

public new abstract class VL : Avx512F.VL
{
internal VL() { }

public static new bool IsSupported { [Intrinsic] get { return false; } }
}

public new abstract class X64 : Avx512F.X64
{
internal X64() { }

public static new bool IsSupported { [Intrinsic] get { return false; } }
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;

namespace System.Runtime.Intrinsics.X86
{
/// <summary>This class provides access to X86 AVX512DQ hardware instructions via intrinsics</summary>
[Intrinsic]
[CLSCompliant(false)]
public abstract class Avx512DQ : Avx512F
{
internal Avx512DQ() { }

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

[Intrinsic]
public new abstract class VL : Avx512F.VL
{
internal VL() { }

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

[Intrinsic]
public new abstract class X64 : Avx512F.X64
{
internal X64() { }

public static new bool IsSupported { get => IsSupported; }
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.Intrinsics;

namespace System.Runtime.Intrinsics.X86
{
/// <summary>This class provides access to X86 AVX512F hardware instructions via intrinsics</summary>
[CLSCompliant(false)]
public abstract class Avx512F : Avx2
{
internal Avx512F() { }

public static new bool IsSupported { [Intrinsic] get { return false; } }

public abstract class VL
{
internal VL() { }

public static bool IsSupported { [Intrinsic] get { return false; } }
}

public new abstract class X64 : Avx2.X64
{
internal X64() { }

public static new bool IsSupported { [Intrinsic] get { return false; } }
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;

namespace System.Runtime.Intrinsics.X86
{
/// <summary>This class provides access to X86 AVX512F hardware instructions via intrinsics</summary>
[Intrinsic]
[CLSCompliant(false)]
public abstract class Avx512F : Avx2
{
internal Avx512F() { }

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

[Intrinsic]
public abstract class VL
{
internal VL() { }

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

[Intrinsic]
public new abstract class X64 : Avx2.X64
{
internal X64() { }

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