Skip to content

9080 expose mat mul precision #9081

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

Merged
merged 22 commits into from
May 9, 2025
Merged

Conversation

yaoshiang
Copy link
Collaborator

@yaoshiang yaoshiang commented May 2, 2025

I added a binding to get the mat mul precision to the init_python_bindings.cpp

I exposed it as a brand new module, torch_xla.backends. This is an ackward name but the goal is to eventually migrate this to torch.backends.xla, to parallel torch.backends.{cuda, cpu, mps, etc}.

I got advice from on very exact numerics for default (1 pass). I made estimates on the 3 pass and 6 pass technique.

I was careful to ensure that there was a non-zero delta from the torch64 cpu calculation - it's easy to make a mistake and end up with your "reference" math also be rounded.

I have a detailed guide on this coming after this PR goes in.

@yaoshiang yaoshiang linked an issue May 2, 2025 that may be closed by this pull request
@yaoshiang yaoshiang requested a review from qihqi May 2, 2025 19:02
@yaoshiang yaoshiang merged commit 41c9913 into master May 9, 2025
24 checks passed
zhanyong-wan pushed a commit to zhanyong-wan/pytorch-xla that referenced this pull request May 9, 2025
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.

Expose mat_mul_precision
5 participants