Skip to content

Conversation

@michaelgsharp
Copy link

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.

@michaelgsharp
Copy link
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.

@@ -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);
Copy link
Owner

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

@tannergooding tannergooding merged commit 60bdf20 into tannergooding:tensors Apr 16, 2025
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants