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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use .NET 6 only #2098

Merged
merged 4 commits into from
Apr 24, 2022
Merged

Use .NET 6 only #2098

merged 4 commits into from
Apr 24, 2022

Conversation

JimBobSquarePants
Copy link
Member

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 馃懏.
  • I have provided test coverage for my change (where applicable)

Description

Reduces our target framework collection to .NET 6 only (.NET 7 when CI testing preview). See #2072

I'll do a follow up PR to clear out any compiler conditionals for items with guaranteed support.
e.g #if SUPPORTS_RUNTIME_INTRINSICS

@JimBobSquarePants JimBobSquarePants requested a review from a team April 22, 2022 11:08
Copy link
Collaborator

@brianpopow brianpopow 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. Its really time to get rid of the old frameworks.

@@ -55,13 +55,17 @@ public void AllowsAllHwIntrinsicFeatures()
HwIntrinsics.AllowAll);
}

#if !NET7_0_OR_GREATER
// COMPlus_EnableSIMD isn't thing anymore.
// https://github.com/dotnet/runtime/issues/66206
Copy link
Contributor

Choose a reason for hiding this comment

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

Just as an aside, it also already wasn't a thing for Arm64 since SIMD support was required by the underlying platform calling convention.

So if a dev were to run this test on an Arm64 device, it would likely fail.

Copy link
Member Author

Choose a reason for hiding this comment

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

That鈥檚 really useful to know, thanks!

With that knowledge I鈥檒l likely just remove the value and update any relevant tests. With .NET 6 we don鈥檛 really need it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Or do I still need to think about Arm32 (is that a thing?)

Copy link
Contributor

Choose a reason for hiding this comment

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

Arm32 doesn't support SIMD acceleration today, the way it has to allocate SIMD registers is significantly different and it's not been a priority since most people are focusing on 64-bit anyways.

Basically COMPlus_EnableSIMD is fairly integral to performance, interop, and just general JIT functionality and so you can realistically expect no one is going to disable it or have it disabled, so it's probably safe to not test it (and that's why we've removed it in .NET 7).

The real thing you want to test for, IMO, is a few key instruction set levels. As these represent hardware differences consumers may have.

COMPlus_EnableHWIntrinsic=0 will basically disable all acceleration. This is mainly useful for testing the "software fallback" path that new platforms may hit and is the most similar to what you probably want instead of COMPlus_EnableSIMD.

For other COMPlus_Enable*=0 settings, that'd be roughly along the lines of that other comment I left a month or two back (the one describing the runtime requirements and the key "hardware versions" you likely want to consider to get broadest reach with the "least" overall work).

Copy link
Member Author

Choose a reason for hiding this comment

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

Perfect. I'll just get rid of it all together again. I need to dig out your old comment. Full of information we're gonna need over the next few months. Thanks again!

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure thing. And feel free to ping me on any of these. Always happy to drop in and help answer questions or give insight.

ImageSharp is a good library and this is one of the ways I can reasonably "contribute" with my otherwise busy schedule.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks! I really appreciate any assistance you provide.

@JimBobSquarePants JimBobSquarePants merged commit 5711e91 into main Apr 24, 2022
@JimBobSquarePants JimBobSquarePants deleted the js/target-frameworks branch April 24, 2022 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants