Skip to content

Conversation

@ahmtox
Copy link
Contributor

@ahmtox ahmtox commented Jun 11, 2025

Creating choose_qparams_per_token_asymmetric.default operator testing framework along with a reference implementation for testing

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

[ghstack-poisoned]
@ahmtox ahmtox requested a review from SS-JIA as a code owner June 11, 2025 16:59
@pytorch-bot
Copy link

pytorch-bot bot commented Jun 11, 2025

🔗 Helpful Links

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

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

❌ 5 New Failures

As of commit 9a2ace2 with merge base 8cfa858 (image):

NEW FAILURES - The following jobs have failed:

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: D76436906

…est setup"

Creating choose_qparams_per_token_asymmetric.default operator testing framework along with a reference implementation for testing

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

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

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

@ahmtox ahmtox added the release notes: vulkan Changes to the Vulkan backend delegate label Jun 11, 2025
…est setup"

Creating choose_qparams_per_token_asymmetric.default operator testing framework along with a reference implementation for testing

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

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

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

…est setup"

Creating choose_qparams_per_token_asymmetric.default operator testing framework along with a reference implementation for testing

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

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

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

…est setup"

Creating choose_qparams_per_token_asymmetric.default operator testing framework along with a reference implementation for testing

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

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

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

…est setup"

Creating choose_qparams_per_token_asymmetric.default operator testing framework along with a reference implementation for testing

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

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

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

…est setup"

Creating choose_qparams_per_token_asymmetric.default operator testing framework along with a reference implementation for testing

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

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

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

…est setup"

Creating choose_qparams_per_token_asymmetric.default operator testing framework along with a reference implementation for testing

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

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

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

…est setup"

Creating choose_qparams_per_token_asymmetric.default operator testing framework along with a reference implementation for testing

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

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

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

…est setup"

Creating choose_qparams_per_token_asymmetric.default operator testing framework along with a reference implementation for testing

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

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

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

…est setup"

Creating choose_qparams_per_token_asymmetric.default operator testing framework along with a reference implementation for testing

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

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

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

@facebook-github-bot facebook-github-bot merged commit 35f2d29 into gh/ahmtox/21/base Jun 14, 2025
91 of 98 checks passed
@facebook-github-bot facebook-github-bot deleted the gh/ahmtox/21/head branch June 14, 2025 03:47
kedarnath03 pushed a commit to kedarnath03/executorch that referenced this pull request Jun 25, 2025
Pull Request resolved: pytorch/executorch#11556

# Context
In order to enhance my own understanding of these operators, I needed to create a reference implementation, and also build out the vulkan testing framework which creates the necessary build up when I need to call the vulkan implementations. I won't explain what the choose_qparams operator actually is in this diff, but will rather opt to explain the operator in a future diff where I implement the glsl shader, however, the reference implementation is heavily inspired by the cpu implementation.

This diff is the per_token reference implementation.

Also this is for the asymmetric version, which has the same quant_min and quant_max all throughout as int8.

# Changes
The main changes were the include of the reference implementation that is used for my own learning, and the necessary wrapper functions that will be called later when the vulkan implementation is successfully completed. It has everything necessary for this purpose, including calling the operator by its appropriate name as when defined in the C++ implementation header, and staging components correctly from the GPU and then the CPU which will be where the comparison is done. I have also included comprehensive failure print statements that prints the tensor size along with relevant parameters.

This is for the per_token implementation.
ghstack-source-id: 290376495
@exported-using-ghexport

Differential Revision: [D76436906](https://our.internmc.facebook.com/intern/diff/D76436906/)
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.

3 participants