Skip to content
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

Add support for broadcasting to linalg.cross #417

Merged
merged 6 commits into from
Sep 19, 2022
Merged

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.

1 participant