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

Add to function and decorator for AffineQuantizedTensor #251

Merged
merged 1 commit into from
May 17, 2024

Conversation

jerryzh168
Copy link
Contributor

Summary:
att
Next: we can move AffineQuantizedTensor to dtypes and make nf4tensor to use the same implements decorator

Test Plan:
python test/quantization/test_quant_api.py

Reviewers:

Subscribers:

Tasks:

Tags:

Summary:
att
Next: we can move AffineQuantizedTensor to dtypes and make nf4tensor to use the same implements decorator

Test Plan:
python test/quantization/test_quant_api.py

Reviewers:

Subscribers:

Tasks:

Tags:
Copy link

pytorch-bot bot commented May 17, 2024

🔗 Helpful Links

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

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

✅ No Failures

As of commit 7eed84a with merge base 9b25ecc (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 May 17, 2024
@jerryzh168 jerryzh168 requested a review from drisspg May 17, 2024 00:15
Copy link
Contributor

@drisspg drisspg left a comment

Choose a reason for hiding this comment

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

looks good, nice cleanup, the only concern I have (potentially unfounded) is the potential for circular imports. Since every subclass will need to share the global op table they will all need to import from this file. Not sure if there is that much benefit to have a global op registry dict

@jerryzh168
Copy link
Contributor Author

jerryzh168 commented May 17, 2024

looks good, nice cleanup, the only concern I have (potentially unfounded) is the potential for circular imports. Since every subclass will need to share the global op table they will all need to import from this file. Not sure if there is that much benefit to have a global op registry dict

oh we'll not put the general stuff in this file, current code is still temporary state, we'll move to dtypes folder

global op registry dict is more for convenience, it's not required, we can refactor as well if that becomes an issue

@jerryzh168 jerryzh168 merged commit 5741aa2 into pytorch:main May 17, 2024
13 checks passed
@jerryzh168 jerryzh168 deleted the add-dec branch May 17, 2024 19:28
# args[0].transposed = not args[0].transposed
# new = args[0]._change_shape(args[0].shape[::-1])
# return return_and_correct_aliasing(func, args, kwargs, new)
raise Exception("transpose not implemented yet")
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you could even return NotImplemented, which will result in a more standardized stack trace. Give it a try if you like.

dbyoung18 pushed a commit to dbyoung18/ao that referenced this pull request Jul 31, 2024
Summary:
att
Next: we can move AffineQuantizedTensor to dtypes and make nf4tensor to use the same implements decorator

Test Plan:
python test/quantization/test_quant_api.py

Reviewers:

Subscribers:

Tasks:

Tags:
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.

4 participants