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

[mono] Failing runtime JIT/SIMD/Vector3Interop_r/ro tests on osx-arm64. #96051

Open
matouskozak opened this issue Dec 15, 2023 · 2 comments
Open
Labels
area-Codegen-JIT-mono area-Interop-mono disabled-test The test is disabled in source code against the issue in-pr There is an active PR which will close this issue when it is merged
Milestone

Comments

@matouskozak
Copy link
Member

matouskozak commented Dec 15, 2023

Failures in JIT/SIMD/Vector3Interop_r/ro on osx-arm64 with miniJIT and interpreter.

Log:

nativeCall_PInvoke_CheckVector3Size: sizeof(Vector3) == 12
nativeCall_PInvoke_Vector3Arg:
    iVal 123
    sumOfEles(1.000000, 2.000000, 3.000000) = 6.000000
    str  abcdefg
    sumOfEles(10.000000, 11.000000, 12.000000) = 33.000000
PInvoke Vector3Arg_Unix test failed
Xunit.Sdk.EqualException: Assert.Equal() Failure: Values differ
Expected: 100
Actual:   101
   at Xunit.Assert.Equal[Int32](Int32 expected, Int32 actual, IEqualityComparer`1 comparer) in /_/src/Microsoft.DotNet.XUnitAssert/src/EqualityAsserts.cs:line 139
   at Xunit.Assert.Equal[Int32](Int32 expected, Int32 actual) in /_/src/Microsoft.DotNet.XUnitAssert/src/EqualityAsserts.cs:line 83
   at __GeneratedMainWrapper.Main()
nativeCall_PInvoke_Vector3Arg_Unix:
    v3f32_xmm0: 1.000000 2.000000 3.000000
    f32_xmm2 - f32_xmm7: 100.000000 101.000000 102.000000 103.000000 104.000000 105.000000
    f32_mem0: 106.000000
    v3f32_mem1: 10.000000 20.000000 30.000000
    f32_mem2-3: 0.000000 107.000000
    sum = 894.000000
Expected: 100
Actual: 101

The same tests are passing on runtime osx-x64 miniJIT/interpreter and linux-arm64 miniJIT CI pipelines.

Could be related to Mono missing support for passing Vectors in SIMD registers (#60068) and/or missing intrinsics support for System.Numerics.Vector3 (#81501).

No longer failing on osx-arm64 miniJIT after #96079.

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Dec 15, 2023
@matouskozak matouskozak added the disabled-test The test is disabled in source code against the issue label Dec 15, 2023
@vargaz vargaz self-assigned this Dec 16, 2023
vargaz added a commit to vargaz/runtime that referenced this issue Dec 16, 2023
vargaz added a commit that referenced this issue Jan 8, 2024
…m64+ios/macos. (#96079)

* [mono] Fix passing of valuetypes with a non-8 byte aligned size on arm64+ios/macos.

Part of the fix for #96051.

* Reenable tests on non-interpreter.

* Fix.
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Feb 11, 2024
vargaz added a commit to vargaz/runtime that referenced this issue Feb 23, 2024
…ts on arm64.

Vector3 was assumed to have size 16 and alignment 8, which caused problems when
calling llvm compiled methods which assumed it was 12/8.

Fixes dotnet#96051.

Previously, different sizes/alignment where used in the pinvoke/non-pinvoke
cases, causing problems with calling llvm compiled methods which always
@vargaz vargaz removed their assignment Mar 22, 2024
@steveisok steveisok removed the untriaged New issue has not been triaged by the area owner label Jun 21, 2024
@steveisok steveisok added this to the Future milestone Jun 21, 2024
@steveisok
Copy link
Member

@lambdageek should #96079 have fixed this?

@lambdageek
Copy link
Member

@lambdageek should #96079 have fixed this?

That PR only fixed the JIT. Interpreter still needs work, I think

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Codegen-JIT-mono area-Interop-mono disabled-test The test is disabled in source code against the issue in-pr There is an active PR which will close this issue when it is merged
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

4 participants