Fixing SetSlice, Reshape, TryCopyTo.#107852
Conversation
src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/ReadOnlyTensorSpan.cs
Outdated
Show resolved
Hide resolved
|
With this proposal, the definition of
Also, note that the bit where numpy and the current TensorSpan deviate in #106539 is just |
|
@soerenwolfers I am about to push a change that will let We will always have some difference between numpy because numpy will allocate new memory behind the scenes if it needs to and we cannot allocate new memory for the I agree a |
src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/ReadOnlyTensorSpan.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorExtensions.cs
Show resolved
Hide resolved
ff1e2d6 to
c234722
Compare
|
/azp run runtime-dev-innerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/backport to release/9.0 |
|
Started backporting to release/9.0: https://github.com/dotnet/runtime/actions/runs/11052885500 |
|
@microsoft-github-policy-service rerun |
|
@dotnet-policy-service rerun |
* working * comments from PR * can always reshape to self * fixed tests * comments from PR * fixing tests
Fixes #106539, #106537, and #106535.
They all had to go in one PR as they were all connected, but basically fixes Reshape/SetSlice to work with 0 strides. Also adds a few more checks to make sure its ok to Reshape the values.