Skip to content

docs(mxfp): correct the outdated scaled_matmul TPU comment#331

Open
lokic233 wants to merge 1 commit into
google:mainfrom
lokic233:navi-mxfp-tpu-comment
Open

docs(mxfp): correct the outdated scaled_matmul TPU comment#331
lokic233 wants to merge 1 commit into
google:mainfrom
lokic233:navi-mxfp-tpu-comment

Conversation

@lokic233

Copy link
Copy Markdown

Summary

jax.nn.scaled_matmul now has a TPU lowering (via the xla.scaled_dot composite,
jax PR #39056), so the existing comment — "Once scaled_matmul supports TPU, we will
enable it for TPU as well"
— is outdated.

However, enabling it on TPU would be a regression: on TPU the composite expands to
a dequantize → bf16 dot_general, which is slower than qwix's existing native fp8
tiled path (_fast_dot_general). This PR updates the comment to state the accurate,
intentional design — scaled_matmul is used only on GPU, and TPU/CPU deliberately
fall through to the faster native fp8 path.

No behavior change (comment only).


Authored with Navi on behalf of @lokic233.

jax.nn.scaled_matmul now has a TPU lowering (via the xla.scaled_dot
composite, jax PR #39056), so the 'Once scaled_matmul supports TPU we will
enable it' comment is outdated. But on TPU the composite expands to a
dequantize->bf16 dot_general, which is slower than qwix's existing native
fp8 tiled path. Update the comment to state that scaled_matmul is used only
on GPU by design, and TPU/CPU intentionally fall through to the faster fp8
path. No behavior change.
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.

1 participant