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

[Mosaic GPU] Improve correctness of benchmarking scripts #24645

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andportnoy
Copy link
Contributor

@andportnoy andportnoy commented Oct 31, 2024

Previously in the reference function for matmul, preferred_element_type=jnp.float32 in combination with astype(out_dtype) was forcing a conversion from fp32 down to fp16, causing an additional kernel to run.

@@ -378,7 +378,7 @@ def ref_f(x, y):
x,
y,
dimension_numbers=dimension_numbers,
preferred_element_type=jnp.float32,
preferred_element_type=out_dtype,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I originally did it to prevent having the baseline use f16 accumulators for 16-bit inputs. Is there some way to enforce that we use 32-bit accumulation in this dot?

@google-ml-butler google-ml-butler bot added kokoro:force-run pull ready Ready for copybara import and testing labels Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pull ready Ready for copybara import and testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants