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

Reconfigure the HWIntrinsic tests to run more selectively #84948

Merged
merged 3 commits into from
Apr 17, 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
10 changes: 10 additions & 0 deletions src/tests/JIT/HardwareIntrinsics/Arm/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>

<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props, $(MSBuildThisFileDirectory)..))" />

<PropertyGroup>
<HWITestsArm64Only>true</HWITestsArm64Only>
</PropertyGroup>

</Project>
6 changes: 0 additions & 6 deletions src/tests/JIT/HardwareIntrinsics/Arm/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@

<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets, $(MSBuildThisFileDirectory)..))" />

<PropertyGroup>
<!-- We have a lot of tests here so run them in outerloop on platforms where they aren't accelerated -->
<CLRTestPriority>1</CLRTestPriority>
<CLRTestPriority Condition="'$(TargetArchitecture)' == 'arm64'">0</CLRTestPriority>
</PropertyGroup>

<PropertyGroup>
<GeneratedHWIntrinsicTestDirectory Condition="'$(GeneratedHWIntrinsicTestDirectory)' == ''">$(IntermediateOutputPath)$(MSBuildProjectName)/gen/</GeneratedHWIntrinsicTestDirectory>
<GeneratedHWIntrinsicTestListFile Condition="'$(GeneratedHWIntrinsicTestListFile)' == ''">$(GeneratedHWIntrinsicTestDirectory)GeneratedHWIntrinsicTestList.txt</GeneratedHWIntrinsicTestListFile>
Expand Down
1 change: 1 addition & 0 deletions src/tests/JIT/HardwareIntrinsics/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<Import Project="..\..\Directory.Merged.props" />
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props, $(MSBuildThisFileDirectory)..))" />
Expand Down
20 changes: 20 additions & 0 deletions src/tests/JIT/HardwareIntrinsics/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>

<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets, $(MSBuildThisFileDirectory)..))" />

<PropertyGroup Condition="'$(HWITestsArm64Only)' == 'true'">
<!-- Various platforms will always throw, so we don't want to spend cycles running tests unnecessarily -->
<!-- We don't need to worry about coverage as we have a number of stress tests that can disable intrinsics per ISA and run on the normally supported platforms -->
<CLRTestTargetUnsupported Condition="'$(TargetArchitecture)' != 'arm64'">true</CLRTestTargetUnsupported>
</PropertyGroup>

<PropertyGroup Condition="'$(HWITestsXarchOnly)' == 'true'">
<!-- Various platforms will always throw, so we don't want to spend cycles running tests unnecessarily -->
<!-- We don't need to worry about coverage as we have a number of stress tests that can disable intrinsics per ISA and run on the normally supported platforms -->
<CLRTestTargetUnsupported Condition="'$(TargetArchitecture)' != 'x64' AND '$(TargetArchitecture)' != 'x86'">true</CLRTestTargetUnsupported>
<CLRTestTargetUnsupported Condition="'$(TargetArchitecture)' == 'x86' AND '$(TargetsWindows)' != 'true'">true</CLRTestTargetUnsupported>
<CLRTestTargetUnsupported Condition="'$(TargetsOSX)' == 'true' AND $(MSBuildProjectName.StartsWith('Avx512'))">true</CLRTestTargetUnsupported>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<HWITestsXarchOnly>true</HWITestsXarchOnly>
</PropertyGroup>
<PropertyGroup>
<DebugType>Embedded</DebugType>
<Optimize />
</PropertyGroup>
<PropertyGroup>
<!-- We have a lot of tests here so run them in outerloop on platforms where they aren't accelerated -->
<CLRTestPriority>1</CLRTestPriority>
<CLRTestPriority Condition="'$(TargetArchitecture)' == 'x64'">0</CLRTestPriority>
<CLRTestPriority Condition="'$(TargetArchitecture)' == 'x86' AND '$(TargetsWindows)' == 'true'">0</CLRTestPriority>
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.Vector256.cs" />
<Compile Include="..\Shared\Program.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<HWITestsXarchOnly>true</HWITestsXarchOnly>
</PropertyGroup>
<PropertyGroup>
<DebugType>Embedded</DebugType>
<Optimize>True</Optimize>
</PropertyGroup>
<PropertyGroup>
<!-- We have a lot of tests here so run them in outerloop on platforms where they aren't accelerated -->
<CLRTestPriority>1</CLRTestPriority>
<CLRTestPriority Condition="'$(TargetArchitecture)' == 'x64'">0</CLRTestPriority>
<CLRTestPriority Condition="'$(TargetArchitecture)' == 'x86' AND '$(TargetsWindows)' == 'true'">0</CLRTestPriority>
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.Vector256.cs" />
<Compile Include="..\Shared\Program.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

<HWITestsXarchOnly>true</HWITestsXarchOnly>
<!-- https://github.com/dotnet/runtime/issues/57352 -->
<MonoAotIncompatible>true</MonoAotIncompatible>
<RequiresProcessIsolation>true</RequiresProcessIsolation>
Expand All @@ -10,12 +10,6 @@
<DebugType>Embedded</DebugType>
<Optimize />
</PropertyGroup>
<PropertyGroup>
<!-- We have a lot of tests here so run them in outerloop on platforms where they aren't accelerated -->
<CLRTestPriority>1</CLRTestPriority>
<CLRTestPriority Condition="'$(TargetArchitecture)' == 'x64'">0</CLRTestPriority>
<CLRTestPriority Condition="'$(TargetArchitecture)' == 'x86' AND '$(TargetsWindows)' == 'true'">0</CLRTestPriority>
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.Vector256_1.cs" />
<Compile Include="..\Shared\Program.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

<HWITestsXarchOnly>true</HWITestsXarchOnly>
<!-- https://github.com/dotnet/runtime/issues/57352 -->
<MonoAotIncompatible>true</MonoAotIncompatible>
<RequiresProcessIsolation>true</RequiresProcessIsolation>
Expand All @@ -10,12 +10,6 @@
<DebugType>Embedded</DebugType>
<Optimize>True</Optimize>
</PropertyGroup>
<PropertyGroup>
<!-- We have a lot of tests here so run them in outerloop on platforms where they aren't accelerated -->
<CLRTestPriority>1</CLRTestPriority>
<CLRTestPriority Condition="'$(TargetArchitecture)' == 'x64'">0</CLRTestPriority>
<CLRTestPriority Condition="'$(TargetArchitecture)' == 'x86' AND '$(TargetsWindows)' == 'true'">0</CLRTestPriority>
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.Vector256_1.cs" />
<Compile Include="..\Shared\Program.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<HWITestsXarchOnly>true</HWITestsXarchOnly>
</PropertyGroup>
<PropertyGroup>
<DebugType>Embedded</DebugType>
<Optimize />
</PropertyGroup>
<PropertyGroup>
<!-- We have a lot of tests here so run them in outerloop on platforms where they aren't accelerated -->
<!-- Unlock other types, Vector512 is only accelerated on a single small pool of machines, so it is always outerloop -->
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.Vector512.cs" />
<Compile Include="..\Shared\Program.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<HWITestsXarchOnly>true</HWITestsXarchOnly>
</PropertyGroup>
<PropertyGroup>
<DebugType>Embedded</DebugType>
<Optimize>True</Optimize>
</PropertyGroup>
<PropertyGroup>
<!-- We have a lot of tests here so run them in outerloop on platforms where they aren't accelerated -->
<!-- Unlock other types, Vector512 is only accelerated on a single small pool of machines, so it is always outerloop -->
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.Vector512.cs" />
<Compile Include="..\Shared\Program.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<HWITestsXarchOnly>true</HWITestsXarchOnly>
</PropertyGroup>
<PropertyGroup>
<DebugType>Embedded</DebugType>
<Optimize />
</PropertyGroup>
<PropertyGroup>
<!-- We have a lot of tests here so run them in outerloop on platforms where they aren't accelerated -->
<!-- Unlock other types, Vector512 is only accelerated on a single small pool of machines, so it is always outerloop -->
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.Vector512_1.cs" />
<Compile Include="..\Shared\Program.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<HWITestsXarchOnly>true</HWITestsXarchOnly>
</PropertyGroup>
<PropertyGroup>
<DebugType>Embedded</DebugType>
<Optimize>True</Optimize>
</PropertyGroup>
<PropertyGroup>
<!-- We have a lot of tests here so run them in outerloop on platforms where they aren't accelerated -->
<!-- Unlock other types, Vector512 is only accelerated on a single small pool of machines, so it is always outerloop -->
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.Vector512_1.cs" />
<Compile Include="..\Shared\Program.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<HWITestsArm64Only>true</HWITestsArm64Only>
</PropertyGroup>
<PropertyGroup>
<DebugType>Embedded</DebugType>
<Optimize />
</PropertyGroup>
<PropertyGroup>
<!-- We have a lot of tests here so run them in outerloop on platforms where they aren't accelerated -->
<CLRTestPriority>1</CLRTestPriority>
<CLRTestPriority Condition="'$(TargetArchitecture)' == 'arm64'">0</CLRTestPriority>
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.Vector64.cs" />
<Compile Include="..\Shared\Program.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<HWITestsArm64Only>true</HWITestsArm64Only>
</PropertyGroup>
<PropertyGroup>
<DebugType>Embedded</DebugType>
<Optimize>True</Optimize>
</PropertyGroup>
<PropertyGroup>
<!-- We have a lot of tests here so run them in outerloop on platforms where they aren't accelerated -->
<CLRTestPriority>1</CLRTestPriority>
<CLRTestPriority Condition="'$(TargetArchitecture)' == 'arm64'">0</CLRTestPriority>
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.Vector64.cs" />
<Compile Include="..\Shared\Program.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<HWITestsArm64Only>true</HWITestsArm64Only>
</PropertyGroup>
<PropertyGroup>
<DebugType>Embedded</DebugType>
<Optimize />
</PropertyGroup>
<PropertyGroup>
<!-- We have a lot of tests here so run them in outerloop on platforms where they aren't accelerated -->
<CLRTestPriority>1</CLRTestPriority>
<CLRTestPriority Condition="'$(TargetArchitecture)' == 'arm64'">0</CLRTestPriority>
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.Vector64_1.cs" />
<Compile Include="..\Shared\Program.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<HWITestsArm64Only>true</HWITestsArm64Only>
</PropertyGroup>
<PropertyGroup>
<DebugType>Embedded</DebugType>
<Optimize>True</Optimize>
</PropertyGroup>
<PropertyGroup>
<!-- We have a lot of tests here so run them in outerloop on platforms where they aren't accelerated -->
<CLRTestPriority>1</CLRTestPriority>
<CLRTestPriority Condition="'$(TargetArchitecture)' == 'arm64'">0</CLRTestPriority>
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.Vector64_1.cs" />
<Compile Include="..\Shared\Program.cs" />
Expand Down
3 changes: 2 additions & 1 deletion src/tests/JIT/HardwareIntrinsics/HardwareIntrinsics_r.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<NumberOfStripesToUseInStress>20</NumberOfStripesToUseInStress>
<NumberOfStripesToUseInStress>32</NumberOfStripesToUseInStress>
<GCStressIncompatible Condition="'$(TargetArchitecture)' == 'arm64' and '$(TargetOS)' == 'osx'">true</GCStressIncompatible>
<GCStressIncompatible Condition="'$(TargetArchitecture)' == 'arm'">true</GCStressIncompatible>
</PropertyGroup>

<ItemGroup>
<MergedWrapperProjectReference Include="*/**/*.csproj" Exclude="**/*_ro.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<NumberOfStripesToUseInStress>20</NumberOfStripesToUseInStress>
<NumberOfStripesToUseInStress>32</NumberOfStripesToUseInStress>
<GCStressIncompatible Condition="'$(TargetArchitecture)' == 'arm64' and '$(TargetOS)' == 'osx'">true</GCStressIncompatible>
<GCStressIncompatible Condition="'$(TargetArchitecture)' == 'arm'">true</GCStressIncompatible>
</PropertyGroup>
Expand Down
10 changes: 10 additions & 0 deletions src/tests/JIT/HardwareIntrinsics/X86/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>

<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props, $(MSBuildThisFileDirectory)..))" />

<PropertyGroup>
<HWITestsXarchOnly>true</HWITestsXarchOnly>
</PropertyGroup>

</Project>
7 changes: 0 additions & 7 deletions src/tests/JIT/HardwareIntrinsics/X86/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,6 @@

<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets, $(MSBuildThisFileDirectory)..))" />

<PropertyGroup>
<!-- We have a lot of tests here so run them in outerloop on platforms where they aren't accelerated -->
<CLRTestPriority>1</CLRTestPriority>
<CLRTestPriority Condition="'$(TargetArchitecture)' == 'x64'">0</CLRTestPriority>
<CLRTestPriority Condition="'$(TargetArchitecture)' == 'x86' AND '$(TargetsWindows)' == 'true'">0</CLRTestPriority>
</PropertyGroup>

<PropertyGroup>
<GeneratedHWIntrinsicTestDirectory Condition="'$(GeneratedHWIntrinsicTestDirectory)' == ''">$(IntermediateOutputPath)$(MSBuildProjectName)/gen/</GeneratedHWIntrinsicTestDirectory>
<GeneratedHWIntrinsicTestListFile Condition="'$(GeneratedHWIntrinsicTestListFile)' == ''">$(GeneratedHWIntrinsicTestDirectory)GeneratedHWIntrinsicTestList.txt</GeneratedHWIntrinsicTestListFile>
Expand Down