-
Notifications
You must be signed in to change notification settings - Fork 198
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
Add hardware check to fp8 quant #1314
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/1314
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 9624574 with merge base 8b1b168 (): This comment was automatically generated by Dr. CI and updates every 15 minutes. |
90b6c38
to
88b6ba1
Compare
torchao/quantization/quant_api.py
Outdated
@@ -939,6 +940,9 @@ def float8_dynamic_activation_float8_weight( | |||
mm_config (Float8MMConfig): Configuration for the matrix multiplication. Default uses fast accumulation. | |||
|
|||
""" | |||
assert ( | |||
is_cuda_8_9 | |||
), "Float8 dynamic activation quantization is only supported on CUDA 8.9 and above" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also be supported on AMD. We should probably update this check.
cc @jeffdaily
Summary: Test Plan: Tested on AMD Instinct MI300X Reviewers: Subscribers: Tasks: Tags:
04e3529
to
2423c1d
Compare
torchao/quantization/quant_api.py
Outdated
@@ -939,6 +941,9 @@ def float8_dynamic_activation_float8_weight( | |||
mm_config (Float8MMConfig): Configuration for the matrix multiplication. Default uses fast accumulation. | |||
|
|||
""" | |||
assert ( | |||
is_cuda_8_9 or is_MI300() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if granularity is PerTensor then it is sm89 if it is PerRow then it is currenlty sm90 or higher
Add hardware check to ensure fp8 quantization only attempts runs on compatible hardware.
Test Plan: Ran float8_dynamic_quant on A100, MI300X, H100
Issue: #1188