forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 4
Many implementations correctly swapped to new form. #25
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
Merged
tannergooding
merged 2 commits into
tannergooding:tensors
from
michaelgsharp:fix-tensor-build
Apr 16, 2025
Merged
Many implementations correctly swapped to new form. #25
tannergooding
merged 2 commits into
tannergooding:tensors
from
michaelgsharp:fix-tensor-build
Apr 16, 2025
Conversation
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
Author
|
Actually, looks like the sln may have been pushed earlier than my commit? not sure. biggest thing i'm worried about is the rebase thought I had conflicts with basically everything, so hoping the resolution went ok. |
...ibraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/ReadOnlyTensorSpan_1.cs
Outdated
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/src/System/Numerics/Tensors/netcore/Tensor.cs
Outdated
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/src/System/Numerics/Tensors/netcore/Tensor.cs
Show resolved
Hide resolved
| @@ -4906,7 +4849,8 @@ public static ref readonly TensorSpan<T> Negate<T>(scoped in ReadOnlyTensorSpan< | |||
| public static T Norm<T>(scoped in ReadOnlyTensorSpan<T> x) | |||
| where T : IRootFunctions<T> | |||
| { | |||
| return TensorPrimitivesHelperSpanInTOut(x, TensorPrimitives.Norm); | |||
| Norm<T> op = default; | |||
| return TensorOperation.Invoke<TensorOperation.Norm<T>, T, T>(x, op); | |||
Owner
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.
This could just use SumOfSquares or Dot(x, x) to simplify
src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/Tensor.cs
Outdated
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/src/System/Numerics/Tensors/netcore/Tensor.cs
Outdated
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/src/System/Numerics/Tensors/netcore/TensorOperation.cs
Outdated
Show resolved
Hide resolved
909ca33 to
4fbecb8
Compare
tannergooding
added a commit
that referenced
this pull request
May 1, 2025
…rious correctness fixes, and stability improvements (dotnet#114927) * Refactor Tensor to be more reusable and validate appropriate state * Handle Equals, GreaterThan, GreaterThanOrEqual, LessThan, LessThanOrEqual, and the *All/*Any variants * Many implementations correctly swapped to new form. (#25) * Refactor Tensor to be more reusable and validate appropriate state * finishing tensor primitives work --------- Co-authored-by: Tanner Gooding <tagoo@outlook.com> * more tensors updates (#26) * Resolve a few build failures * Ensure SetSlice and ToString are working as expected * Tensors lastfew (#27) * only couple left * pausing for food * fixed rented buffer * squeeze/unsqueeze * set slice/ split * only 2 left * Minor cleanup of the Tensor files * Ensure that tensor tests are building * Resolving various build failures due to API compatibility * Ensure flattendLength is adjusted after the stride is set for that dimension * Ensure that we set linearLength if -1 is passed in when strides is empty * Ensure that the first index is correct * Cleanup to ensure iteration and construction initializes correctly * Ensure that broadcasting is allowed to be in any stride position * Have AreCompatible handle empty shapes * Ensure IndexOutOfRangeException is thrown for invalid indexes * Ensure that the stride is set to 0 when the length of a dimension is 1, so embedded broadcasting works * Fixing Broadcasting Loop (#29) * Fixing Broadcasting Loop * fixes from pr coments * squeeze fixed * unsqueeze * set slice * more tensor fies * Ensure that minimumLinearLength is actually the minimum * Ensure the rented buffer is cleared * Fix the AreCompatible checks * Tensor finishing (#30) * stack working * more tensor tests working * fix factory create tests * only2 tests left * Update src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorShape.cs * Update compatibility suppressions * transpose working * reverse working * Revert the unnecessary sln changes * Remove an unnecessary using --------- Co-authored-by: Michael Sharp <51342856+michaelgsharp@users.noreply.github.com> Co-authored-by: Michael Sharp <misharp@microsoft.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Still have about 10 more to go from my list, but geting this up now.
I'll remove the generated sln file, it was added during the rebase for some reason.