Skip to content

[ET-VK][Ops] dequantize_per_tensor.default test setup #11481

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

Open
wants to merge 8 commits into
base: gh/ahmtox/14/base
Choose a base branch
from

Conversation

ahmtox
Copy link

@ahmtox ahmtox commented Jun 9, 2025

Creating dequantize_per_tensor testing framework along with a reference implementation for testing

Differential Revision: [D76267054](https://our.internmc.facebook.com/intern/diff/D76267054/)

[ghstack-poisoned]
@ahmtox ahmtox requested a review from SS-JIA as a code owner June 9, 2025 15:04
Copy link

pytorch-bot bot commented Jun 9, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/11481

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

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D76267054

Creating dequantize_per_tensor testing framework along with a reference implementation for testing

Differential Revision: [D76267054](https://our.internmc.facebook.com/intern/diff/D76267054/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D76267054

Creating dequantize_per_tensor testing framework along with a reference implementation for testing

Differential Revision: [D76267054](https://our.internmc.facebook.com/intern/diff/D76267054/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D76267054

ASSERT_TRUE(output_correct);
}

// Test cases for dequantize_per_tensor
Copy link
Contributor

Choose a reason for hiding this comment

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

also add tests for int32 and int64

Copy link
Author

Choose a reason for hiding this comment

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

theres no real support for int64 in the shader. right now dequantize matches the IO for quantize which include half, float and then uint8, int8, and int32 as common dtypes and to avoid generating excess variants. if int64 is a necessary variant I'll make those changes in a future diff.

there is a diff that adds double support (though really just fp32 underneath)

i will add more tests in this diff.

Copy link
Contributor

Choose a reason for hiding this comment

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

As @ahmtox has pointed out, to reduce binary size Vulkan kind of takes the opposite approach of the portable kernels, which means supporting the minimum dtypes necessary i.e. basically what we would expect to encounter in a "real" model.

Creating dequantize_per_tensor testing framework along with a reference implementation for testing

Differential Revision: [D76267054](https://our.internmc.facebook.com/intern/diff/D76267054/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D76267054

@ahmtox ahmtox added the release notes: vulkan Changes to the Vulkan backend delegate label Jun 11, 2025
Creating dequantize_per_tensor testing framework along with a reference implementation for testing

Differential Revision: [D76267054](https://our.internmc.facebook.com/intern/diff/D76267054/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D76267054

Creating dequantize_per_tensor testing framework along with a reference implementation for testing

Differential Revision: [D76267054](https://our.internmc.facebook.com/intern/diff/D76267054/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D76267054

Creating dequantize_per_tensor testing framework along with a reference implementation for testing

Differential Revision: [D76267054](https://our.internmc.facebook.com/intern/diff/D76267054/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D76267054

Creating dequantize_per_tensor testing framework along with a reference implementation for testing

Differential Revision: [D76267054](https://our.internmc.facebook.com/intern/diff/D76267054/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D76267054

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. fb-exported release notes: vulkan Changes to the Vulkan backend delegate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants