Skip to content

[fp8] Only assert when CUDA is available. #2590

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Stonepia
Copy link

This commit performs the capability checks only when CUDA is available, so that we have better support for third-party devices like Intel GPU.

Copy link

pytorch-bot bot commented Jul 24, 2025

🔗 Helpful Links

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

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

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

@facebook-github-bot facebook-github-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 Jul 24, 2025
@Stonepia Stonepia changed the title Only assert when CUDA is available. [fp8] Only assert when CUDA is available. Jul 24, 2025
@Stonepia Stonepia marked this pull request as draft July 24, 2025 02:21

assert is_sm_at_least_89() or is_MI300(), (
"Float8 dynamic quantization requires CUDA compute capability ≥8.9 or MI300+."
)
Copy link
Contributor

Choose a reason for hiding this comment

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

This change will impact other device, such as cpu or any unknow device. Suggest to add common utlis function to judge the fp8 capability and apply it to all fp8 related changes. This function should only ensure the CUDA compute capability ≥8.9 or MI300+ and XPU device is available now.

Stonepia added 2 commits July 24, 2025 02:31
This commit performs the capability checks only when CUDA is available, so that we have better support for third-party devices like Intel GPU.
@liangan1
Copy link
Contributor

liangan1 commented Jul 24, 2025

Can you show the accuracy result for dq-fp8 for both CUDA and XPU based on the LLama-3.1-8B?

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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants