Remove the experimental attribute from the tensor APIs#117103
Merged
tannergooding merged 8 commits intodotnet:mainfrom Jul 1, 2025
Merged
Remove the experimental attribute from the tensor APIs#117103tannergooding merged 8 commits intodotnet:mainfrom
tannergooding merged 8 commits intodotnet:mainfrom
Conversation
Contributor
|
Should the table at the end of this document be updated to note that the experimental attribute was removed in .NET 10: If so, you might want to also update SYSLIB5005 since experimental was removed from that API in #113021. |
1e75260 to
5e0684d
Compare
This was referenced Jun 28, 2025
7733b83 to
253bd41
Compare
This was referenced Jun 29, 2025
cd11990 to
1cbd243
Compare
Contributor
There was a problem hiding this comment.
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. |
This was referenced Jun 29, 2025
hez2010
reviewed
Jun 30, 2025
src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.netcore.cs
Show resolved
Hide resolved
stephentoub
reviewed
Jun 30, 2025
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
tannergooding
commented
Jun 30, 2025
src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.netcore.cs
Outdated
Show resolved
Hide resolved
tannergooding
commented
Jun 30, 2025
src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/IReadOnlyTensor_1.cs
Outdated
Show resolved
Hide resolved
tannergooding
commented
Jun 30, 2025
src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/ITensor_1.cs
Show resolved
Hide resolved
Co-authored-by: Stephen Toub <[email protected]>
tannergooding
commented
Jun 30, 2025
src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.csproj
Show resolved
Hide resolved
stephentoub
approved these changes
Jun 30, 2025
…ors/netcore/Tensor.cs
3 tasks
tannergooding
commented
Jun 30, 2025
src/libraries/System.Numerics.Tensors/src/System.Numerics.Tensors.csproj
Show resolved
Hide resolved
This was referenced Jul 1, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
IsPinnedproperty is correctly tracked and passed throughout the tensor types, and ensured thatTensorSpan/ROTensorSpancould implement the tensor interfaces.