Skip to content

Adding a new CI leg for netcoreapp 3.0 #1700

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

Merged
merged 9 commits into from
Nov 28, 2018
Merged

Adding a new CI leg for netcoreapp 3.0 #1700

merged 9 commits into from
Nov 28, 2018

Conversation

Anipik
Copy link
Contributor

@Anipik Anipik commented Nov 21, 2018

Fixes #1711

@safern safern self-requested a review November 21, 2018 21:08
@Anipik Anipik changed the title [WIP] Adding a new CI leg for netcoreapp 3.0 Adding a new CI leg for netcoreapp 3.0 Nov 22, 2018
@Anipik
Copy link
Contributor Author

Anipik commented Nov 26, 2018

@danmosemsft @safern @Ivanidzo4ka @shauheen @tannergooding can please take a look at this pr ?

@@ -158,9 +158,6 @@ public static unsafe void MatMul(AlignedArray mat, AlignedArray src, AlignedArra

public static unsafe void MatMul(ReadOnlySpan<float> mat, ReadOnlySpan<float> src, Span<float> dst, int crow, int ccol)
{
Contracts.Assert(crow % 4 == 0);
Copy link
Member

Choose a reason for hiding this comment

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

Why are these asserts being removed as part of enabling CI?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These asserts are wrong, they were not being tested earlier because contracts.Assert was being removed.

Copy link
Member

@safern safern left a comment

Choose a reason for hiding this comment

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

LGTM for the yml changes and script changes.

@@ -161,7 +161,7 @@ public void EarlyStoppingTest()
/// <summary>
/// Multiclass Logistic Regression test.
/// </summary>
[Fact]
[ConditionalFact(typeof(BaseTestBaseline), nameof(BaseTestBaseline.NotNetCore30))] // netcore3.0 output differs from Baseline
Copy link
Member

Choose a reason for hiding this comment

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

Disabling these tests on netcoreapp3.0 feels wrong. What happens when we completely move to .NET Core 3.0? We will then have to spend effort on re-enabling these tests for 3.0.

Is there a way we can investigate why the baselines differ? Rather than just shutting the tests off?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am working on investigating the failures on netcoreapp3.0
I was able to fix some more tests in the aligned Array PR,
I have an issue open with the list of those tests. but we may require some more people to work on it.

@Anipik
Copy link
Contributor Author

Anipik commented Nov 27, 2018

@eerhardt can you take another look ?

@@ -254,7 +254,7 @@ public void TestCrossValidationBinaryMacro()
}
}

[Fact]
[ConditionalFact(typeof(BaseTestBaseline), nameof(BaseTestBaseline.LessThanNetCore30OrNotNetCore))] // netcore3.0 output differs from Baseline
Copy link
Member

Choose a reason for hiding this comment

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

What are we doing to track getting these tests enabled on .net core 3?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i have opened the issue for it #1096

It contains the list of tests that we fixed and ones still remaining

@eerhardt
Copy link
Member

Release build is still failing

@Anipik
Copy link
Contributor Author

Anipik commented Nov 27, 2018

Release build is still failing

it is due to this change #1724

@@ -951,8 +943,6 @@ public static unsafe void Scale(float scale, Span<float> dst)

public static unsafe void ScaleSrcU(float scale, ReadOnlySpan<float> src, Span<float> dst, int count)
{
Contracts.Assert(src.Length == dst.Length);
Copy link
Member

Choose a reason for hiding this comment

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

I think asserts here are still valuable, aren't they?

Contracts.Assert(count <= src.Length && src.Length <= dst.Length);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will add the more appropiate asserts with the documentation pr.
I am thinking of an another approach of slicing the span to the required length before passing to these functions and adding the contracts.Assert(src.Length == dst.Length) . Is this approach worth doing ?

Copy link
Member

Choose a reason for hiding this comment

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

IMO - no I don't think that approach is worth doing. That's why the count parameter is passed to these functions - so the spans don't need to be the same length, and one of the spans isn't chosen as "the one with the right length". It's unnecessary logic to ensure the spans are the same length.

Slicing spans is cheap, but it isn't free. You still have bounds checks to ensure the sliced values are less than the span length.

Copy link
Member

@eerhardt eerhardt left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks for doing this work, @Anipik !

@Anipik Anipik merged commit 3d33e20 into dotnet:master Nov 28, 2018
@Anipik Anipik deleted the newci branch November 28, 2018 20:59
@ghost ghost locked as resolved and limited conversation to collaborators Mar 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants