Skip to content

Conversation

@kgryte
Copy link
Contributor

@kgryte kgryte commented Apr 18, 2022

This PR

  • addresses Broadcast behavior in linalg.cross #415 by adding support for broadcasting to linalg.cross. Broadcasting follows NumPy behavior in only broadcasting the non-compute dimensions. With the exception of TensorFlow, this behavior is consistent (or will be after PyTorch addresses its broadcasting behavior) among array libraries.
  • updates vecdot to match linalg.cross in being more explicit that broadcasting only applies to non-broadcast dimensions.
  • brings linalg.cross in line with linear algebra design principles in which linear algebra APIs commonly support batching.

@kgryte kgryte added API change Changes to existing functions or objects in the API. topic: Linear Algebra Linear algebra. labels Apr 18, 2022
@kgryte kgryte added this to the v2022 milestone Apr 18, 2022
@kgryte
Copy link
Contributor Author

kgryte commented Sep 19, 2022

As this PR has been discussed (see #415 (comment)) and met with approval in consortium meetings and now that PyTorch has now added support for broadcasting, will merge. We can submit follow-up PRs if the specification needs further changes/refinement.

@kgryte kgryte merged commit eba54b3 into main Sep 19, 2022
@kgryte kgryte deleted the cross-broadcasting branch September 19, 2022 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API change Changes to existing functions or objects in the API. topic: Linear Algebra Linear algebra.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants