Skip to content

Fix static AQT flow #2046

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

Merged
merged 1 commit into from
Apr 11, 2025
Merged

Fix static AQT flow #2046

merged 1 commit into from
Apr 11, 2025

Conversation

andrewor14
Copy link
Contributor

Summary: Fixes this error with the static AQT flow:

  File "/home/andrewor/local/ao/test/dtypes/test_affine_quantized.py", line 269, in test_to_affine_quantized_intx_static
    to_affine_quantized_intx_static(
  File "/home/andrewor/local/ao/torchao/dtypes/affine_quantized_tensor.py", line 325, in from_hp_to_intx_static
    input_float, scale, zero_point = _layout.pre_process_static(
TypeError: Layout.pre_process_static() missing 1 required positional argument: 'block_size'

Test Plan:
python test/dtypes/test_affine_quantized.py -k test_to_affine_quantized_intx_static
python tutorials/calibration_flow/static_quant.py

@andrewor14 andrewor14 requested a review from jerryzh168 April 11, 2025 20:44
Copy link

pytorch-bot bot commented Apr 11, 2025

🔗 Helpful Links

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

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

✅ No Failures

As of commit 93992af with merge base a81322e (image):
💚 Looks good so far! There are no failures yet. 💚

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 Apr 11, 2025
**Summary:** Fixes this error with the static AQT flow:
```
  File "/home/andrewor/local/ao/test/dtypes/test_affine_quantized.py", line 269, in test_to_affine_quantized_intx_static
    to_affine_quantized_intx_static(
  File "/home/andrewor/local/ao/torchao/dtypes/affine_quantized_tensor.py", line 325, in from_hp_to_intx_static
    input_float, scale, zero_point = _layout.pre_process_static(
TypeError: Layout.pre_process_static() missing 1 required positional argument: 'block_size'
```

**Test Plan:**
python test/dtypes/test_affine_quantized.py -k test_to_affine_quantized_intx_static
python tutorials/calibration_flow/static_quant.py
@jerryzh168 jerryzh168 added the topic: bug fix Use this tag for PRs that fix bugs label Apr 11, 2025
@andrewor14 andrewor14 merged commit 7936d0d into main Apr 11, 2025
18 of 19 checks passed
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: bug fix Use this tag for PRs that fix bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants