Skip to content

Conversation

Valentine233
Copy link
Collaborator

Support the FP8 SDPA pattern match.
Depend on #2565.

Copy link

pytorch-bot bot commented Sep 26, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/3076

Note: Links to docs will display an error until the docs builds have been completed.

✅ You can merge normally! (4 Unrelated Failures)

As of commit 1ad747c with merge base 233cfc1 (image):

BROKEN TRUNK - The following jobs failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@Valentine233 Valentine233 marked this pull request as draft September 26, 2025 09:00
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 26, 2025
@Valentine233 Valentine233 added topic: not user facing Use this tag if you don't want this PR to show up in release notes and removed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels Sep 26, 2025
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 26, 2025
@Valentine233 Valentine233 marked this pull request as ready for review October 10, 2025 02:07
@Valentine233
Copy link
Collaborator Author

@mingfeima Please help take a look at the PR, thanks!

Comment on lines +141 to +146
self.q_out_scale = 1.5
self.k_out_scale = 1.5
self.attn_weights_scale = 1.5
self.v_out_scale = 1.5
self.attn_out_scale = 1.5
self.qk_out_scale = 1.5

Choose a reason for hiding this comment

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

any particular reason we use the magic number 1.5? and FP8QDQLinear is using 2.0

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These values are just randomly selected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. topic: not user facing Use this tag if you don't want this PR to show up in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants