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

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

Merged
merged 4 commits into from
Apr 7, 2025

Conversation

SS-JIA
Copy link
Contributor

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

Stack from ghstack (oldest at bottom):

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

cc @manuelcandales @cbilgin

## 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/)

[ghstack-poisoned]
@SS-JIA SS-JIA requested review from lucylq and jackzhxng as code owners April 4, 2025 20:49
@pytorch-bot pytorch-bot bot added the module: vulkan Issues related to the Vulkan delegate and code under backends/vulkan/ label Apr 4, 2025
Copy link

pytorch-bot bot commented Apr 4, 2025

🔗 Helpful Links

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

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

✅ No Failures

As of commit 22fdb0b with merge base 6adff9c (image):
💚 Looks good so far! There are no failures yet. 💚

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

SS-JIA added a commit that referenced this pull request Apr 4, 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/)

ghstack-source-id: 276219519
Pull Request resolved: #9918
@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 4, 2025
@facebook-github-bot
Copy link
Contributor

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

## 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

[ghstack-poisoned]
SS-JIA added a commit that referenced this pull request Apr 4, 2025
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

Differential Revision: [D72480177](https://our.internmc.facebook.com/intern/diff/D72480177/)
ghstack-source-id: 276235672
@facebook-github-bot
Copy link
Contributor

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

@SS-JIA SS-JIA added the release notes: vulkan Changes to the Vulkan backend delegate label Apr 7, 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

[ghstack-poisoned]
SS-JIA added a commit that referenced this pull request Apr 7, 2025
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: 276549534

Differential Revision: [D72480177](https://our.internmc.facebook.com/intern/diff/D72480177/)
@facebook-github-bot
Copy link
Contributor

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

## 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

[ghstack-poisoned]
SS-JIA added a commit that referenced this pull request Apr 7, 2025
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/)
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot facebook-github-bot merged commit 73f2c97 into gh/SS-JIA/208/base Apr 7, 2025
87 of 90 checks passed
@facebook-github-bot facebook-github-bot deleted the gh/SS-JIA/208/head branch April 7, 2025 21:34
kirklandsign pushed a commit that referenced this pull request Apr 7, 2025
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/)
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 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