-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Remove the experimental attribute from the tensor APIs #117103
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
Should the table at the end of this document be updated to note that the experimental attribute was removed in .NET 10: https://github.com/dotnet/runtime/blob/main/docs/project/list-of-diagnostics.md If so, you might want to also update SYSLIB5005 since experimental was removed from that API in #113021. |
1e75260
to
5e0684d
Compare
7733b83
to
253bd41
Compare
cd11990
to
1cbd243
Compare
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.
Pull Request Overview
This PR removes the experimental attributes from the tensor APIs and associated types, indicating that these APIs have now reached stability. Key changes include:
- Removal of [Experimental(…)] attributes from files such as Tensor.cs, TensorSpan.cs, TensorSpanDebugView.cs, ITensor*.cs, and related files.
- Updates to constructors and method signatures to consistently pass the new pinned parameter where needed.
- Adjustments to compatibility suppressions and project files to reflect these API changes.
Reviewed Changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/tools/illink/src/linker/CompatibilitySuppressions.xml | Updated suppression entries to align with the removal of experimental attributes. |
src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/Tensor_1.cs | Removed the experimental attribute from Tensor and adjusted constructor signatures. |
src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorSpan_1.cs | Removed the experimental attribute and updated constructors to include the pinned parameter. |
src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorSpanDebugView.cs | Removed the experimental attribute. |
Other files | Similar removals of the experimental attribute and corresponding adjustments across different tensor APIs and supporting types. |
src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.netcore.cs
Show resolved
Hide resolved
src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.netcore.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.netcore.cs
Show resolved
Hide resolved
...System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/ReadOnlyTensorDimensionSpan_1.cs
Show resolved
Hide resolved
src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.net9.cs
Show resolved
Hide resolved
src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/IReadOnlyTensor.cs
Show resolved
Hide resolved
...ibraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/ReadOnlyTensorSpan_1.cs
Show resolved
Hide resolved
src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/Tensor.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.netcore.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/IReadOnlyTensor_1.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/ITensor_1.cs
Show resolved
Hide resolved
Co-authored-by: Stephen Toub <[email protected]>
src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.csproj
Show resolved
Hide resolved
…ors/netcore/Tensor.cs
This removes the experimental attribute, marking the APIs as stable.
As part of that, I did a pass to do some minor analyzer suggested cleanup/improvements to the code, ensured that the
IsPinned
property is correctly tracked and passed throughout the tensor types, and ensured thatTensorSpan
/ROTensorSpan
could implement the tensor interfaces.