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

[benchmarks] Set matrix multiplication precision. #7748

Merged
merged 2 commits into from
Jul 25, 2024

Conversation

ysiraichi
Copy link
Collaborator

This PR modifies PyTorch/XLA benchmarking scripts so that we execute the benchmarks with the same precision as what we are setting for PyTorch.

Previously, we only called torch.set_float32_matmul_precision('high'), leaving PyTorch/XLA precision to be the default one. Now, we are also calling torch_xla._XLAC._xla_set_mat_mul_precision('high').

Additionally, this PR also replaces _xla_set_use_full_mat_mul_precision by _xla_set_mat_mul_precision, making the precision set more explicit and translatable between PyTorch and PyTorch/XLA.

cc @miladm @JackCaoG @zpcore

@ysiraichi ysiraichi merged commit 2870e93 into master Jul 25, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants