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

Batched axes support for Nx.dot #9

Closed
polvalente opened this issue Nov 22, 2024 · 1 comment · Fixed by #35
Closed

Batched axes support for Nx.dot #9

polvalente opened this issue Nov 22, 2024 · 1 comment · Fixed by #35

Comments

@polvalente
Copy link
Collaborator

polvalente commented Nov 22, 2024

MLX has both tensordot and matmul. We have gone with tensordot, which doesn't support batched axes. However, matmul does, with some specific rules. We can special-case this into EMLX.Backend, with some clever reshape rules.

einsum might also be an alternative

@polvalente
Copy link
Collaborator Author

There is also an issue where MLX only supports floating point types for the output in both matmul and tensordot

@polvalente polvalente changed the title tensordot vs matmul Batched axes support for Nx.dot Nov 25, 2024
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 a pull request may close this issue.

1 participant