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

Vector128 and Vector256 General purpose DotProduct tests fail #75791

Closed
davidwrighton opened this issue Sep 17, 2022 · 5 comments · Fixed by #76642 or #79552
Closed

Vector128 and Vector256 General purpose DotProduct tests fail #75791

davidwrighton opened this issue Sep 17, 2022 · 5 comments · Fixed by #76642 or #79552
Assignees
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone

Comments

@davidwrighton
Copy link
Member

davidwrighton commented Sep 17, 2022

Description

These tests fail when upgraded to the new xunit based test system. This issue will be visible once #74886 is merged.

Reproduction Steps

Run the hardwareintrinsics_ro merged test project located in src/tests/JIT/HardwareIntrinsics/HardwareIntrinsics_ro.csproj

Expected behavior

Test should reliably pass.

Actual behavior

It fails where the difference in behavior is a floating point accuracy issue. (The algorithm is ... close in result) The expected result is within a small fraction of the actual result.

Console output looks like

21:26:27.767 Running test: global::JIT.HardwareIntrinsics.General._Vector128.Program.DotSingle()
Beginning scenario: RunBasicScenario_UnsafeRead
Vector128.Dot<Single>(Vector128<Single>, Vector128<Single>): RunBasicScenario_UnsafeRead failed:
    left: (0.3433865, 0.9667737, 0.12783496, 0.37054372)
   right: (0.98444676, 0.49922475, 0.64575523, 0.07723055)
  result: 0.93185043

Beginning scenario: RunReflectionScenario_UnsafeRead
Beginning scenario: RunClsVarScenario
Beginning scenario: RunLclVarScenario_UnsafeRead
Vector128.Dot<Single>(Vector128<Single>, Vector128<Single>): RunLclVarScenario_UnsafeRead failed:
    left: (0.3433865, 0.9667737, 0.12783496, 0.37054372)
   right: (0.98444676, 0.49922475, 0.64575523, 0.07723055)
  result: 0.93185043

Beginning scenario: RunClassLclFldScenario
Beginning scenario: RunClassFldScenario
Vector128.Dot<Single>(Vector128<Single>, Vector128<Single>): RunClassFldScenario failed:
    left: (0.74744684, 0.2090859, 0.9512482, 0.5400413)
   right: (0.558003, 0.40041316, 0.7649265, 0.91902465)
  result: 1.7247446

Beginning scenario: RunStructLclFldScenario
Beginning scenario: RunStructFldScenario
21:26:28.001 Failed test: global::JIT.HardwareIntrinsics.General._Vector128.Program.DotSingle()

Regression?

Unlikely.

Known Workarounds

No response

Configuration

No response

Other information

No response

category:correctness
theme:vector-codegen
skill-level:beginner
cost:small
impact:small

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Sep 17, 2022
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Sep 17, 2022
@ghost
Copy link

ghost commented Sep 17, 2022

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

These tests fail when upgraded to the new xunit based test system. This issue will be visible once #74886 is merged.

Reproduction Steps

Run the hardwareintrinsics_ro merged test project located in src/tests/JIT/HardwareIntrinsics/HardwareIntrinsics_ro.csproj

Expected behavior

Test should reliably pass.

Actual behavior

It fails where the difference in behavior is a floating point accuracy issue. (The algorithm is ... close in result) The expected result is within a small fraction of the actual result.

Console output looks like

21:26:27.767 Running test: global::JIT.HardwareIntrinsics.General._Vector128.Program.DotSingle()
Beginning scenario: RunBasicScenario_UnsafeRead
Vector128.Dot<Single>(Vector128<Single>, Vector128<Single>): RunBasicScenario_UnsafeRead failed:
    left: (0.3433865, 0.9667737, 0.12783496, 0.37054372)
   right: (0.98444676, 0.49922475, 0.64575523, 0.07723055)
  result: 0.93185043

Beginning scenario: RunReflectionScenario_UnsafeRead
Beginning scenario: RunClsVarScenario
Beginning scenario: RunLclVarScenario_UnsafeRead
Vector128.Dot<Single>(Vector128<Single>, Vector128<Single>): RunLclVarScenario_UnsafeRead failed:
    left: (0.3433865, 0.9667737, 0.12783496, 0.37054372)
   right: (0.98444676, 0.49922475, 0.64575523, 0.07723055)
  result: 0.93185043

Beginning scenario: RunClassLclFldScenario
Beginning scenario: RunClassFldScenario
Vector128.Dot<Single>(Vector128<Single>, Vector128<Single>): RunClassFldScenario failed:
    left: (0.74744684, 0.2090859, 0.9512482, 0.5400413)
   right: (0.558003, 0.40041316, 0.7649265, 0.91902465)
  result: 1.7247446

Beginning scenario: RunStructLclFldScenario
Beginning scenario: RunStructFldScenario
21:26:28.001 Failed test: global::JIT.HardwareIntrinsics.General._Vector128.Program.DotSingle()

Regression?

Unlikely.

Known Workarounds

No response

Configuration

No response

Other information

No response

Author: davidwrighton
Assignees: -
Labels:

area-CodeGen-coreclr, untriaged

Milestone: -

@JulieLeeMSFT JulieLeeMSFT removed the untriaged New issue has not been triaged by the area owner label Sep 19, 2022
@JulieLeeMSFT JulieLeeMSFT added this to the 8.0.0 milestone Sep 19, 2022
@JulieLeeMSFT
Copy link
Member

@kunalspathak PTAL. cc @dotnet/jit-contrib.
@davidwrighton, setting it to .net 8.0. Please get back to me if it needs to be 7.0.

@tannergooding
Copy link
Member

I'd guess there is some subtle difference in addition ordering for the pre SSE4.1 codegen and that is causing it to be slightly off as compared to dpps.

@BruceForstall
Copy link
Member

Why do they only fail when converted to the new test system? Are we not properly running them in the current test system?

@markples
Copy link
Member

Is this #76280? It looks like there are numerous failure symptoms there (all zeroes, all ones, inverted max, etc.), but #76280 (comment) shows a small value change.

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Nov 13, 2022
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Jan 12, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Feb 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
6 participants