Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Add dir.props files to hardware intrinsics test directories to control test env variables #15637

Closed
wants to merge 1 commit into from
Closed
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
21 changes: 21 additions & 0 deletions tests/src/JIT/HardwareIntrinsics/X86/Sse2/dir.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Condition="Exists('..\dir.props')" Project="..\dir.props"/>

<PropertyGroup>
<CLRTestBatchPreCommands>
<![CDATA[
$(CLRTestBatchPreCommands)
set COMPlus_EnableAVX=0
Copy link
Member

@tannergooding tannergooding Jan 1, 2018

Choose a reason for hiding this comment

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

I don't think we want to always disable AVX here.

Instead, I think we want to test the following scenarios:

  • SSE2 Enabled, higher ISAs disabled (default since SSE2 is required by RyuJIT)
  • SSE41 Enabled, higher ISAs disabled (some of the helper functions should use INSERTPD, BLENDPD, etc)
  • AVX Enabled, higher ISAs disabled (for VEX encoding path, some helper functions should use VBROADCAST, etc)
  • other ISA Enabled, higher ISAs disabled (for when helper functions use other newer/better instructions)

Copy link
Author

Choose a reason for hiding this comment

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

I don't think we want to always disable AVX here.

IMO we need to create a comprehensive testing plan for all Hardware Intrinsic where part of it should comprise setting of environment switches for group of tests. Anyway we are going to face combinatorial bomb here. It is related to #15490

Copy link
Author

Choose a reason for hiding this comment

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

@jkotas @tannergooding

I have unsuccessfully looked for solution to the following problem: how to run same group of tests each time with different environment settings?

This could be useful for example in case of all Sse ... Sse42 intrinsics which in majority of cases can be promoted to AVX/AVX2 and AVX512 codegen and we should run the tests with SSE CodeGen enabled, AVX CodeGen enabled and SSE disabled etc etc

Any ideas?

Copy link
Member

Choose a reason for hiding this comment

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

The simplest approach would be to update the netci.groovy script to have new jobs for the required environments (I believe jitStressModeScenarios is used for this, but I am not positive).

A less expensive approach (not requiring 4 new jobs that run in the outer loop) would be to update the test wrapper, JIT.HardwareIntrinsics.XUnitWrapper, to run just the hardware intrinsic tests with each configuration setting (the wrapper currently configures the environment and calls the generated exe for each test, so it is a logical place to put this logic).

Copy link
Member

Choose a reason for hiding this comment

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

Not sure if there is any infrastructure preference on one vs the other (or some other approach), however.

Copy link

Choose a reason for hiding this comment

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

The simplest approach would be to update the netci.groovy script to have new jobs for the required environments

Agree.

Copy link
Author

Choose a reason for hiding this comment

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

OK I will try both and we can verify than by running them in CI which is the best solution.

]]>
</CLRTestBatchPreCommands>
<BashCLRTestPreCommands>
<![CDATA[
$(BashCLRTestPreCommands)
export COMPlus_EnableAVX=0
]]>
</BashCLRTestPreCommands>
</PropertyGroup>
<PropertyGroup>
<LangVersion>7.1</LangVersion>
</PropertyGroup>
</Project>
19 changes: 19 additions & 0 deletions tests/src/JIT/HardwareIntrinsics/X86/dir.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Condition="Exists('..\dir.props')" Project="..\dir.props"/>

<PropertyGroup>
<CLRTestBatchPreCommands>
<![CDATA[
$(CLRTestBatchPreCommands)
set COMPlus_EnableIncompleteISAClass=1
]]>
</CLRTestBatchPreCommands>
<BashCLRTestPreCommands>
<![CDATA[
$(BashCLRTestPreCommands)
export COMPlus_EnableIncompleteISAClass=1
]]>
</BashCLRTestPreCommands>
</PropertyGroup>

</Project>
3 changes: 3 additions & 0 deletions tests/src/JIT/HardwareIntrinsics/dir.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Condition="Exists('..\dir.props')" Project="..\dir.props"/>
</Project>