Skip to content
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

Fix WOQ int8 failures #884

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

leslie-fang-intel
Copy link
Contributor

Fix WOQ int8 failures as discussed in #843 (comment)

Copy link

pytorch-bot bot commented Sep 13, 2024

🔗 Helpful Links

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

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

❌ 1 New Failure, 1 Unrelated Failure

As of commit 828571c with merge base 8236a87 (image):

NEW FAILURE - The following job has failed:

FLAKY - The following job failed but was likely due to flakiness present on trunk:

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 Sep 13, 2024
@leslie-fang-intel
Copy link
Contributor Author

cc @jerryzh168 @bdhirsh

if not TORCH_VERSION_AT_LEAST_2_5:
if (
not TORCH_VERSION_AT_LEAST_2_5
) or torch._inductor.config.freezing:
Copy link
Contributor

Choose a reason for hiding this comment

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

when is freezing set? how do user know that they need to call unwrap_tensor_subclass in that case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi Jerry, freezing is setting in

@torch._inductor.config.patch({"freezing": True})
when running the UT. User can also set it as torch._inductor.config.freezing=True in script or using the environment variable as TORCHINDUCTOR_FREEZING=1

Copy link
Contributor Author

@leslie-fang-intel leslie-fang-intel Sep 13, 2024

Choose a reason for hiding this comment

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

how do user know that they need to call unwrap_tensor_subclass in that case?

That's a good question. Did you mean we should write document somewhere? And the root-cause for why freezing needs unwrap_tensor_subclass is in pytorch/pytorch#123522.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see, thanks for the context! yeah I think it would be good to add this in the README: https://github.com/pytorch/ao/tree/main/torchao/quantization#workaround-with-unwrap_tensor_subclass-for-export-aoti-and-torchcompile-pytorch-24-and-before-only and link the issue as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks and adding the readme with issue link in this PR. please help to take a look again.

Copy link
Contributor

@jerryzh168 jerryzh168 left a comment

Choose a reason for hiding this comment

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

LGTM

@jerryzh168
Copy link
Contributor

please fix CI before landing

@leslie-fang-intel
Copy link
Contributor Author

leslie-fang-intel commented Sep 16, 2024

please fix CI before landing

Thanks @jerryzh168, we should land the PR in PyTorch at first.
Could you help to take a review pytorch/pytorch#135928?

@leslie-fang-intel
Copy link
Contributor Author

Hi @jerryzh168, since pytorch/pytorch#135928 has been merged into PyTorch, could you approve the CI run for this PR to check if it passes all tests?

@leslie-fang-intel
Copy link
Contributor Author

It seems test_int8_weight_only_quant_subclass_api with float16 inputs still failed which is probably due to numerical issue. Will take a further look.

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