dotnet / dotnet/announcements

System.Runtime.Intrinsics in .NET Core 2.1

Open
#60 0 comments 0 reactions 0 assignees View on GitHub
.NET Core 2.1 Breaking Change
Dominant language
No language data
Stars
1.4k
Forks
53
PR merge metrics
No merged PRs in 30d

Description

# System.Runtime.Intrinsics in .NET Core 2.1

.NET Core 2.1 has been adding platform intrinsic APIs to support directly calling processor specific instructions, such as Intel’s x86 SIMD instructions. See the [initial platform intrinsics design](https://github.com/dotnet/designs/blob/master/accepted/platform-intrinsics.md) for more information.

We have decided that it makes the most sense for this intrinsics feature to ship in a “preview” status in the .NET Core 2.1 RTM timeframe. This means that the runtime support we are implementing will be included, but the assembly exposing the intrinsics will only be available to projects via explicit reference to a “preview-only” package. These APIs won’t be included in the official .NET Core 2.1 packages.

Given our limited time and resources, recent changes in the approach we take to expose the intrinsics, and API changes prompted by design feedback from the community, we don’t believe there is enough time to settle these APIs for 2.1. We plan to follow the pattern of other recent features like Span and Memory that first shipped in preview before formally joining the supported API surface. Not only would we expect the next version of .NET Core to support more intrinsics than could be supported in 2.1, but we expect to have real usage examples in CoreFX and higher level components as well. These real world examples, as well as feedback from customers who opt in to the preview, should give us the confidence we need to officially support the APIs going forward.

## Discussion

Please share your thoughts on this change and see what others are saying at:

https://github.com/dotnet/corefx/issues/27486

## Details

In the coming days, we plan on removing System.Runtime.Intrinsics.dll from the Microsoft.NETCore.App package. This means any libraries/applications that are using these APIs will no longer compile by default, and will not run on new builds of .NET Core 2.1.

At the same time, we will start producing a new System.Runtime.Intrinsics.Experimental NuGet package. In order to continue using these APIs on .NET Core 2.1, a project will need to add a reference to this new package.

As its name implies, this package is experimental and should only be used for preview purposes. It isn’t expected to be used in production scenarios. Future version of .NET Core (after 2.1) will be allowed to break this package. This enables us respond to future feedback that requires the APIs to be modified.

In the future, when we are confident we have the intrinsic APIs right, we will stop producing the System.Runtime.Intrinsics.Experimental package. The platform intrinsics APIs will then be added back to Microsoft.NETCore.App and will be officially supported.

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue names the initial platform intrinsics design and the dotnet/corefx#27486 discussion as starting references. Read those first; the announcement does not identify a file, test, entry point, or concrete definition of done, so scope and completion criteria require maintainer clarification.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.