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

Support fake_quantize_per_tensor_affine_cachemask #3477

Merged

Conversation

mgehre-amd
Copy link
Contributor

Add a new op with shape/dtypes and decompose into fake_quantize_per_tensor_affine when the second result is unused.

The xfail_set change is on ONNX because torch cannot export this op to ONNX.

@mgehre-amd mgehre-amd requested a review from zjgarvey June 20, 2024 12:32
@mgehre-amd mgehre-amd force-pushed the matthias.fake_quantize_per_tensor_affine_cachemask branch 2 times, most recently from 5040f50 to 9f3751d Compare June 20, 2024 13:25
Add a new op with shape/dtypes and decompose into fake_quantize_per_tensor_affine
when the second result is unused.

The xfail_set change is on ONNX because torch cannot export this op to ONNX.
@mgehre-amd mgehre-amd force-pushed the matthias.fake_quantize_per_tensor_affine_cachemask branch from 9f3751d to 322608d Compare June 20, 2024 14:07
Copy link
Collaborator

@zjgarvey zjgarvey left a comment

Choose a reason for hiding this comment

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

This looks good to me! I didn't know you could use the replaceAllUsesWith and then just erase the op since the other results aren't being used. I'm going to steal this and use it in another PR right now, so thanks for the lesson.

@mgehre-amd mgehre-amd enabled auto-merge (squash) June 21, 2024 07:05
@mgehre-amd mgehre-amd merged commit acd57a3 into llvm:main Jun 21, 2024
3 checks passed
@mgehre-amd mgehre-amd deleted the matthias.fake_quantize_per_tensor_affine_cachemask branch June 21, 2024 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants