Skip to content

[ET-VK][ez] Allow logit linear layer to be lowered to Vulkan #9951

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

Merged
merged 1 commit into from
Apr 7, 2025

Conversation

SS-JIA
Copy link
Contributor

@SS-JIA SS-JIA commented Apr 7, 2025

This PR was created by the merge bot to help merge the original PR into the main branch.
ghstack PR number: #9918 by @SS-JIA
^ Please use this as the source of truth for the PR details, comments, and reviews
ghstack PR base: https://github.com/pytorch/executorch/tree/gh/SS-JIA/208/base
ghstack PR head: https://github.com/pytorch/executorch/tree/gh/SS-JIA/208/head
Merge bot PR base: https://github.com/pytorch/executorch/tree/gh/SS-JIA/207/orig
Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/SS-JIA/208/orig
@diff-train-skip-merge

cc @manuelcandales @cbilgin

@SS-JIA SS-JIA requested review from lucylq and jackzhxng as code owners April 7, 2025 22:51
@pytorch-bot pytorch-bot bot added the module: vulkan Issues related to the Vulkan delegate and code under backends/vulkan/ label Apr 7, 2025
Copy link

pytorch-bot bot commented Apr 7, 2025

🔗 Helpful Links

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

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 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 Apr 7, 2025
Base automatically changed from gh/SS-JIA/207/orig to main April 7, 2025 22:54
Pull Request resolved: #9918

## Context

Due to poor performance of Vulkan's int4 linear operator, the final logit layer of the transformer model was not being delegated to vulkan, and was instead quantized and executed with the XNNPACK delegate.

However, with D72412950 / #9883 decent performance can now be achieved with Vulkan/s int4 linear op. Therefore, the final logit layer can be lowered to Vulkan.

## Changes

* Remove limit from `VkInt4WeightOnlyQuantizer` that was causing it to ignore the logit layer of the transformer
* Do not apply XNNPACK partitioner and quantizer when lowering with Vulkan
ghstack-source-id: 276566114

Differential Revision: [D72480177](https://our.internmc.facebook.com/intern/diff/D72480177/)
@kirklandsign kirklandsign added the release notes: vulkan Changes to the Vulkan backend delegate label Apr 7, 2025
@kirklandsign kirklandsign merged commit 2cce2db into main Apr 7, 2025
3 checks passed
@kirklandsign kirklandsign deleted the gh/SS-JIA/208/orig branch April 7, 2025 22:55
kirklandsign pushed a commit that referenced this pull request Apr 11, 2025
## Context

Due to poor performance of Vulkan's int4 linear operator, the final logit layer of the transformer model was not being delegated to vulkan, and was instead quantized and executed with the XNNPACK delegate.

However, with D72412950 / #9883 decent performance can now be achieved with Vulkan/s int4 linear op. Therefore, the final logit layer can be lowered to Vulkan.

## Changes

* Remove limit from `VkInt4WeightOnlyQuantizer` that was causing it to ignore the logit layer of the transformer
* Do not apply XNNPACK partitioner and quantizer when lowering with Vulkan

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

cc @manuelcandales @cbilgin
keyprocedure pushed a commit to keyprocedure/executorch that referenced this pull request Apr 21, 2025
…#9951)

## Context

Due to poor performance of Vulkan's int4 linear operator, the final logit layer of the transformer model was not being delegated to vulkan, and was instead quantized and executed with the XNNPACK delegate.

However, with D72412950 / pytorch#9883 decent performance can now be achieved with Vulkan/s int4 linear op. Therefore, the final logit layer can be lowered to Vulkan.

## Changes

* Remove limit from `VkInt4WeightOnlyQuantizer` that was causing it to ignore the logit layer of the transformer
* Do not apply XNNPACK partitioner and quantizer when lowering with Vulkan

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

cc @manuelcandales @cbilgin
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. module: vulkan Issues related to the Vulkan delegate and code under backends/vulkan/ release notes: vulkan Changes to the Vulkan backend delegate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants