-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Moves dotnet-server shutdown to official build yml file #1432
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
Conversation
Ivanidzo4ka
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
![]()
| internal sealed class SafeTrainingAndModelBuffer : IDisposable | ||
| { | ||
| [StructLayout(LayoutKind.Explicit)] | ||
| [StructLayout(LayoutKind.Sequential)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not how we typically handle this on the .NET Core team.
Instead, what we typically do is define a static/stable binary interface from the C library, and P/Invoke into that. This involves doing conversion from native sized values like int into stable values - int32_t - which maps directly to System.Int32.
I suggest following the same pattern that we do elsewhere. It has treated us very well on the .NET Core team.
/cc @wschin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eerhardt, could you share some examples here? I guess we still need to define structure translation between C++ and C# somewhere right? If so, what's the place in your mind? What's the difference between defining in that place and here? Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wschin - checkout https://github.com/dotnet/corefx/blob/master/Documentation/coding-guidelines/interop-guidelines.md#unix-shims for the guidance we've been using on the .NET Core team. There are some guidelines that are corefx specific - like the naming guidelines (SystemNative_).
Here is an example of the passwd struct:
The definition in C++ code:
Notice that it uses static sized integers: uint32_t - it will always be an unsigned 32-bit integer.
Here is a C++ method that returns the structure:
And then the corresponding matching structure in C#:
eerhardt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the P/Invoke interop into libmf needs to be changed as suggested.
|
Would you suggest doing this as part of this PR, or open a new issue about that? |
|
It would probably be best for @wschin to do the work in a separate PR. What you are doing here is taking a step backwards IMO. Instead, let's disable the tests on x86, open a bug to fix it. That will unblock this PR, and allow for us to do "the right thing" in a separate change. |
|
Sounds good, I will disable the test for now, revert the changes and open a new issue. |
|
I opened an issue #1441 to track the problem brought up by Eric. |
eerhardt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
![]()
shauheen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
![]()
Fixes #1404 and #1421.
In this PR, I move the command of shutting down dotnet processes to the official build yml file. This should solve the problem of tests failing but status report being positive (the error outputs were hidden by the output of shutting down the dotnet-server).
I also disable two LightGBM test on x86, as LightGBM is not supported on x86.
I disabled two Matrix Factorization tests on x86. Matrix factorization should work on x86, but the current iteration of the code does not support it. This bug is being tracked as part of #1441.
I tested manually queuing 5 official builds and they all succeeded: https://devdiv.visualstudio.com/DevDiv/_build?definitionId=8739