Skip to content

Conversation

@asmeurer
Copy link
Member

These came up from data-apis/array-api-tests#101.

It was not properly imported, and also torch.cross does not broadcast correctly in all cases.
- torch.vecdot incorrectly allows broadcasting in the contracted dimensions - The 2023 version of the spec updates the language to require axis to apply before broadcasting, not after. The implementation for integer arguments is updated to follow this behavior. Note that the spec only actually requires axis to be negative, but we allow nonnegative axis too if x1 and x2 have the required number of dimensions and those dimensions have same value, which matches the numpy gufunc vecdot implementation and also the base torch.vecdot implementation as far as I can tell.
This is changed in the 2023 version of the spec, and matches the new np.vecdot gufunc.
Also cleanup the torch.linalg __all__
@asmeurer asmeurer merged commit 74b7b79 into data-apis:main Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant