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

System.Numerics.Tensors.Tests.SingleGenericTensorPrimitives.SpanScalarDestination_SpecialValues fails under jitstress on win-x86 #102335

Open
jakobbotsch opened this issue May 16, 2024 · 8 comments
Assignees
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI blocking-clean-ci-optional Blocking optional rolling runs
Milestone

Comments

@jakobbotsch
Copy link
Member

Example pipeline rune: https://dev.azure.com/dnceng-public/public/_build/results?buildId=677384&view=ms.vss-test-web.build-test-results-tab
Example console log: https://helixre107v0xdcypoyl9e7f.blob.core.windows.net/dotnet-runtime-refs-pull-102261-merge-6809f596adec438f97/System.Numerics.Tensors.Tests/1/console.2b07caea.log?helixlogtype=result

  Starting:    System.Numerics.Tensors.Tests (parallel test collections = on [4 threads], stop on fail = off)
    System.Numerics.Tensors.Tests.SingleGenericTensorPrimitives.SpanScalarDestination_SpecialValues(tensorPrimitivesMethod: SpanScalarDestinationDelegate`3 { Method = Void MinNumber[Single](System.ReadOnlySpan`1[System.Single], Single, System.Span`1[System.Single]), Target = null }, expectedMethod: Func`3 { Method = Single MinNumber(Single, Single), Target = null }, tolerance: null) [FAIL]
      Assert.All() Failure: 240 out of 256 items in the collection did not pass.
      [16]:  Item:  17
             Error: Assert.All() Failure: 24 out of 24 items in the collection did not pass.
                    [0]:  Item:  NaN
                          Error: Assert.Equal() Failure: Values differ
                                 Expected: 0.735287189
                                 Actual:   0.805774391
                    [1]:  Item:  NaN
                          Error: Assert.Equal() Failure: Values differ
                                 Expected: 0.735287189
                                 Actual:   0.805774391
                    [2]:  Item:  NaN
                          Error: Assert.Equal() Failure: Values differ
                                 Expected: 0.735287189
                                 Actual:   NaN

cc @tannergooding

There are also failures in NonGenericSingleTensorPrimitivesTests.CosineSimilarity_AllLengths in this pipeline run for win-x64.

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label May 16, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label May 16, 2024
@jakobbotsch jakobbotsch added area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI blocking-clean-ci-optional Blocking optional rolling runs and removed untriaged New issue has not been triaged by the area owner needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels May 16, 2024
@jakobbotsch jakobbotsch added this to the 9.0.0 milestone May 16, 2024
Copy link
Contributor

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

@EgorBo
Copy link
Member

EgorBo commented May 17, 2024

@tannergooding
Copy link
Member

It's interesting that either of those are failing for jitstress runs. JitStress shouldn't impact whether or not something is imported as intrinsic by the JIT and so the actual IR at importation should be the same here.

I'm not going to have time to look at this until after next week (due to Microsoft Build being next week), but I wonder if this is exposing some long-existing issue between FusedMultiplyAdd and the register allocator

@v-wenyuxu
Copy link

Failed in: runtime-coreclr libraries-jitstress 20240522.1

Failed tests:

net9.0-linux-Release-x64-jitstress2_tiered-Ubuntu.2204.Amd64.Open
    - System.Numerics.Tensors.Tests.NonGenericSingleTensorPrimitivesTests.CosineSimilarity_AllLengths
net9.0-linux-Release-x64-jitstress1_tiered-Ubuntu.2204.Amd64.Open
    - System.Numerics.Tensors.Tests.NonGenericSingleTensorPrimitivesTests.CosineSimilarity_AllLengths
    - System.Numerics.Tensors.Tests.SingleGenericTensorPrimitives.CosineSimilarity_AllLengths
net9.0-windows-Release-x64-jitstress1_tiered-Windows.10.Amd64.Open
    - System.Numerics.Tensors.Tests.NonGenericSingleTensorPrimitivesTests.CosineSimilarity_AllLengths
    - System.Numerics.Tensors.Tests.SingleGenericTensorPrimitives.CosineSimilarity_AllLengths
    - System.Numerics.Tensors.Tests.SingleGenericTensorPrimitives.CosineSimilarity_AllLengths
    - System.Numerics.Tensors.Tests.NonGenericSingleTensorPrimitivesTests.CosineSimilarity_AllLengths

Error message:

 Assert.All() Failure: 4 out of 256 items in the collection did not pass.
[3]: Item:  4
     Error: Assert.Equal() Failure: Values differ
            Expected: 0.151808769
            Actual:   0.25312683
[4]: Item:  5
     Error: Assert.Equal() Failure: Values differ
            Expected: 0.253379166
            Actual:   0.138663024
[5]: Item:  6
     Error: Assert.Equal() Failure: Values differ
            Expected: -0.344092488
            Actual:   -0.0114496415
[6]: Item:  7
     Error: Assert.Equal() Failure: Values differ
            Expected: -0.410494238
            Actual:   -0.248638168

Stack trace:

   at System.Numerics.Tensors.Tests.TensorPrimitivesTests`1.CosineSimilarity_AllLengths() in /_/src/libraries/System.Numerics.Tensors/tests/TensorPrimitivesTests.cs:line 740
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs:line 57

@v-wenyuxu
Copy link

Failed in: runtime-coreclr libraries-jitstress 20240523.1

Failed tests:

net9.0-linux-Release-x64-jitstress2_tiered-Ubuntu.2204.Amd64.Open
    - System.Numerics.Tensors.Tests.NonGenericSingleTensorPrimitivesTests.CosineSimilarity_AllLengths
    - System.Numerics.Tensors.Tests.SingleGenericTensorPrimitives.CosineSimilarity_AllLengths
    - System.Numerics.Tensors.Tests.NonGenericSingleTensorPrimitivesTests.CosineSimilarity_AllLengths
net9.0-linux-Release-x64-jitstress1_tiered-Ubuntu.2204.Amd64.Open
    - System.Numerics.Tensors.Tests.NonGenericSingleTensorPrimitivesTests.CosineSimilarity_AllLengths
    - System.Numerics.Tensors.Tests.NonGenericSingleTensorPrimitivesTests.CosineSimilarity_AllLengths
net9.0-windows-Release-x64-jitstress1_tiered-Windows.10.Amd64.Open
    - System.Numerics.Tensors.Tests.SingleGenericTensorPrimitives.CosineSimilarity_AllLengths
    - System.Numerics.Tensors.Tests.NonGenericSingleTensorPrimitivesTests.CosineSimilarity_AllLengths
    - System.Numerics.Tensors.Tests.SingleGenericTensorPrimitives.CosineSimilarity_AllLengths
    - System.Numerics.Tensors.Tests.NonGenericSingleTensorPrimitivesTests.CosineSimilarity_AllLengths

Error message:

 Assert.All() Failure: 4 out of 256 items in the collection did not pass.
[3]: Item:  4
     Error: Assert.Equal() Failure: Values differ
            Expected: 0.151808769
            Actual:   0.25312683
[4]: Item:  5
     Error: Assert.Equal() Failure: Values differ
            Expected: 0.253379166
            Actual:   0.138663024
[5]: Item:  6
     Error: Assert.Equal() Failure: Values differ
            Expected: -0.344092488
            Actual:   -0.0114496415
[6]: Item:  7
     Error: Assert.Equal() Failure: Values differ
            Expected: -0.410494238
            Actual:   -0.248638168

Stack trace:

   at System.Numerics.Tensors.Tests.TensorPrimitivesTests`1.CosineSimilarity_AllLengths() in /_/src/libraries/System.Numerics.Tensors/tests/TensorPrimitivesTests.cs:line 740
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs:line 57

@v-wenyuxu
Copy link

Failed in: runtime-coreclr libraries-jitstress 20240526.1

Failed tests:

net9.0-linux-Release-x64-jitstress2_tiered-Ubuntu.2204.Amd64.Open
    - System.Numerics.Tensors.Tests.NonGenericSingleTensorPrimitivesTests.CosineSimilarity_AllLengths
net9.0-linux-Release-x64-jitstress1_tiered-Ubuntu.2204.Amd64.Open
    - System.Numerics.Tensors.Tests.SingleGenericTensorPrimitives.CosineSimilarity_AllLengths
net9.0-windows-Release-x64-jitstress1_tiered-Windows.10.Amd64.Open
    - System.Numerics.Tensors.Tests.SingleGenericTensorPrimitives.CosineSimilarity_AllLengths
    - System.Numerics.Tensors.Tests.NonGenericSingleTensorPrimitivesTests.CosineSimilarity_AllLengths

Error message:

 Assert.All() Failure: 4 out of 256 items in the collection did not pass.
[3]: Item:  4
     Error: Assert.Equal() Failure: Values differ
            Expected: 0.151808769
            Actual:   0.25312683
[4]: Item:  5
     Error: Assert.Equal() Failure: Values differ
            Expected: 0.253379166
            Actual:   0.138663024
[5]: Item:  6
     Error: Assert.Equal() Failure: Values differ
            Expected: -0.344092488
            Actual:   -0.0114496415
[6]: Item:  7
     Error: Assert.Equal() Failure: Values differ
            Expected: -0.410494238
            Actual:   -0.248638168

Stack trace:

   at System.Numerics.Tensors.Tests.TensorPrimitivesTests`1.CosineSimilarity_AllLengths() in /_/src/libraries/System.Numerics.Tensors/tests/TensorPrimitivesTests.cs:line 740
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs:line 57

@v-wenyuxu
Copy link

Failed in: runtime-coreclr libraries-jitstress 20240527.1

Failed tests:

net9.0-linux-Release-x64-jitstress2_tiered-Ubuntu.2204.Amd64.Open
    - System.Numerics.Tensors.Tests.SingleGenericTensorPrimitives.CosineSimilarity_AllLengths
    - System.Numerics.Tensors.Tests.SingleGenericTensorPrimitives.CosineSimilarity_AllLengths
net9.0-linux-Release-x64-jitstress1_tiered-Ubuntu.2204.Amd64.Open
    - System.Numerics.Tensors.Tests.NonGenericSingleTensorPrimitivesTests.CosineSimilarity_AllLengths
    - System.Numerics.Tensors.Tests.NonGenericSingleTensorPrimitivesTests.CosineSimilarity_AllLengths
net9.0-windows-Release-x64-jitstress1_tiered-Windows.10.Amd64.Open
    - System.Numerics.Tensors.Tests.SingleGenericTensorPrimitives.CosineSimilarity_AllLengths
    - System.Numerics.Tensors.Tests.NonGenericSingleTensorPrimitivesTests.CosineSimilarity_AllLengths
    - System.Numerics.Tensors.Tests.NonGenericSingleTensorPrimitivesTests.CosineSimilarity_AllLengths
    - System.Numerics.Tensors.Tests.SingleGenericTensorPrimitives.CosineSimilarity_AllLengths

Error message:

 Assert.All() Failure: 4 out of 256 items in the collection did not pass.
[3]: Item:  4
     Error: Assert.Equal() Failure: Values differ
            Expected: 0.151808769
            Actual:   0.25312683
[4]: Item:  5
     Error: Assert.Equal() Failure: Values differ
            Expected: 0.253379166
            Actual:   0.138663024
[5]: Item:  6
     Error: Assert.Equal() Failure: Values differ
            Expected: -0.344092488
            Actual:   -0.0114496415
[6]: Item:  7
     Error: Assert.Equal() Failure: Values differ
            Expected: -0.410494238
            Actual:   -0.248638168

Stack trace:

   at System.Numerics.Tensors.Tests.TensorPrimitivesTests`1.CosineSimilarity_AllLengths() in /_/src/libraries/System.Numerics.Tensors/tests/TensorPrimitivesTests.cs:line 740
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs:line 57

@v-wenyuxu
Copy link

Failed in: runtime-coreclr libraries-jitstress 20240528.1

Failed tests:

net9.0-linux-Release-x64-jitstress2_tiered-Ubuntu.2204.Amd64.Open
    - System.Numerics.Tensors.Tests.SingleGenericTensorPrimitives.CosineSimilarity_AllLengths
net9.0-linux-Release-x64-jitstress1_tiered-Ubuntu.2204.Amd64.Open
    - System.Numerics.Tensors.Tests.NonGenericSingleTensorPrimitivesTests.CosineSimilarity_AllLengths
    - System.Numerics.Tensors.Tests.SingleGenericTensorPrimitives.CosineSimilarity_AllLengths
net9.0-windows-Release-x64-jitstress1_tiered-Windows.10.Amd64.Open
    - System.Numerics.Tensors.Tests.NonGenericSingleTensorPrimitivesTests.CosineSimilarity_AllLengths
    - System.Numerics.Tensors.Tests.SingleGenericTensorPrimitives.CosineSimilarity_AllLengths
    - System.Numerics.Tensors.Tests.SingleGenericTensorPrimitives.CosineSimilarity_AllLengths
    - System.Numerics.Tensors.Tests.NonGenericSingleTensorPrimitivesTests.CosineSimilarity_AllLengths

Error message:

 Assert.All() Failure: 4 out of 256 items in the collection did not pass.
[3]: Item:  4
     Error: Assert.Equal() Failure: Values differ
            Expected: 0.151808769
            Actual:   0.25312683
[4]: Item:  5
     Error: Assert.Equal() Failure: Values differ
            Expected: 0.253379166
            Actual:   0.138663024
[5]: Item:  6
     Error: Assert.Equal() Failure: Values differ
            Expected: -0.344092488
            Actual:   -0.0114496415
[6]: Item:  7
     Error: Assert.Equal() Failure: Values differ
            Expected: -0.410494238
            Actual:   -0.248638168

Stack trace:

   at System.Numerics.Tensors.Tests.TensorPrimitivesTests`1.CosineSimilarity_AllLengths() in /_/src/libraries/System.Numerics.Tensors/tests/TensorPrimitivesTests.cs:line 740
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs:line 57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI blocking-clean-ci-optional Blocking optional rolling runs
Projects
None yet
Development

No branches or pull requests

4 participants