Skip to content

Conversation

SS-JIA
Copy link
Contributor

@SS-JIA SS-JIA commented Aug 15, 2025

Stack from ghstack (oldest at bottom):

Motivation

Be able to test Vulkan lowering via optimum-executorch.

Context

Very similar to the below PR, Int4 weight only quantization is currently enabled in Vulkan via a custom source transform quantizer that replaces linear layers with a custom linear layer that calls a custom weight only quantized linear op.

This diff aims to make it so that no Vulkan specific source transforms need to be applied by adding a fusion pattern for weight only quantized linear.

Changes

  • Introduce a fusable graph pattern for weight only quantized linear
  • Add fusion logic for weight only quantized linear in the fuse patterns pass
  • Add 4w qmode to the export llama script

Differential Revision: D80293302

## Motivation

Be able to test Vulkan lowering via optimum-executorch.

## Context

Very similar to the below PR, Int4 weight only quantization is currently enabled in Vulkan via a custom source transform quantizer that replaces linear layers with a custom linear layer that calls a custom weight only quantized linear op.

This diff aims to make it so that no Vulkan specific source transforms need to be applied by adding a fusion pattern for weight only quantized linear.


## Changes

* Introduce a fusable graph pattern for weight only quantized linear
* Add fusion logic for weight only quantized linear in the fuse patterns pass
* Add `4w` qmode to the export llama script

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

[ghstack-poisoned]
Copy link

pytorch-bot bot commented Aug 15, 2025

🔗 Helpful Links

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

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

❌ 1 New Failure

As of commit fb29875 with merge base 1b4968f (image):

NEW FAILURE - The following job has failed:

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

SS-JIA pushed a commit that referenced this pull request Aug 15, 2025
## Motivation

Be able to test Vulkan lowering via optimum-executorch.

## Context

Very similar to the below PR, Int4 weight only quantization is currently enabled in Vulkan via a custom source transform quantizer that replaces linear layers with a custom linear layer that calls a custom weight only quantized linear op.

This diff aims to make it so that no Vulkan specific source transforms need to be applied by adding a fusion pattern for weight only quantized linear.


## Changes

* Introduce a fusable graph pattern for weight only quantized linear
* Add fusion logic for weight only quantized linear in the fuse patterns pass
* Add `4w` qmode to the export llama script

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

ghstack-source-id: 303222323
Pull Request resolved: #13452
@meta-cla meta-cla 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 Aug 15, 2025
@facebook-github-bot
Copy link
Contributor

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

Copy link

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

## Motivation

Be able to test Vulkan lowering via optimum-executorch.

## Context

Very similar to the below PR, Int4 weight only quantization is currently enabled in Vulkan via a custom source transform quantizer that replaces linear layers with a custom linear layer that calls a custom weight only quantized linear op.

This diff aims to make it so that no Vulkan specific source transforms need to be applied by adding a fusion pattern for weight only quantized linear.


## Changes

* Introduce a fusable graph pattern for weight only quantized linear
* Add fusion logic for weight only quantized linear in the fuse patterns pass
* Add `4w` qmode to the export llama script

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

[ghstack-poisoned]
SS-JIA pushed a commit that referenced this pull request Aug 15, 2025
Pull Request resolved: #13452

## Motivation

Be able to test Vulkan lowering via optimum-executorch.

## Context

Very similar to the below PR, Int4 weight only quantization is currently enabled in Vulkan via a custom source transform quantizer that replaces linear layers with a custom linear layer that calls a custom weight only quantized linear op.

This diff aims to make it so that no Vulkan specific source transforms need to be applied by adding a fusion pattern for weight only quantized linear.


## Changes

* Introduce a fusable graph pattern for weight only quantized linear
* Add fusion logic for weight only quantized linear in the fuse patterns pass
* Add `4w` qmode to the export llama script

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

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

## Motivation

Be able to test Vulkan lowering via optimum-executorch.

## Context

Very similar to the below PR, Int4 weight only quantization is currently enabled in Vulkan via a custom source transform quantizer that replaces linear layers with a custom linear layer that calls a custom weight only quantized linear op.

This diff aims to make it so that no Vulkan specific source transforms need to be applied by adding a fusion pattern for weight only quantized linear.


## Changes

* Introduce a fusable graph pattern for weight only quantized linear
* Add fusion logic for weight only quantized linear in the fuse patterns pass
* Add `4w` qmode to the export llama script

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

[ghstack-poisoned]
SS-JIA pushed a commit that referenced this pull request Aug 15, 2025
Pull Request resolved: #13452

## Motivation

Be able to test Vulkan lowering via optimum-executorch.

## Context

Very similar to the below PR, Int4 weight only quantization is currently enabled in Vulkan via a custom source transform quantizer that replaces linear layers with a custom linear layer that calls a custom weight only quantized linear op.

This diff aims to make it so that no Vulkan specific source transforms need to be applied by adding a fusion pattern for weight only quantized linear.


## Changes

* Introduce a fusable graph pattern for weight only quantized linear
* Add fusion logic for weight only quantized linear in the fuse patterns pass
* Add `4w` qmode to the export llama script
ghstack-source-id: 303277500

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

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

## Motivation

Be able to test Vulkan lowering via optimum-executorch.

## Context

Very similar to the below PR, Int4 weight only quantization is currently enabled in Vulkan via a custom source transform quantizer that replaces linear layers with a custom linear layer that calls a custom weight only quantized linear op.

This diff aims to make it so that no Vulkan specific source transforms need to be applied by adding a fusion pattern for weight only quantized linear.


## Changes

* Introduce a fusable graph pattern for weight only quantized linear
* Add fusion logic for weight only quantized linear in the fuse patterns pass
* Add `4w` qmode to the export llama script

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

[ghstack-poisoned]
SS-JIA pushed a commit that referenced this pull request Aug 15, 2025
Pull Request resolved: #13452

Be able to test Vulkan lowering via optimum-executorch.

Very similar to the below PR, Int4 weight only quantization is currently enabled in Vulkan via a custom source transform quantizer that replaces linear layers with a custom linear layer that calls a custom weight only quantized linear op.

This diff aims to make it so that no Vulkan specific source transforms need to be applied by adding a fusion pattern for weight only quantized linear.

* Introduce a fusable graph pattern for weight only quantized linear
* Add fusion logic for weight only quantized linear in the fuse patterns pass
* Add `4w` qmode to the export llama script
ghstack-source-id: 6903b2d

Differential Revision: [D80293302](https://our.internmc.facebook.com/intern/diff/D80293302/)
@SS-JIA
Copy link
Contributor Author

SS-JIA commented Aug 15, 2025

@SS-JIA has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

## Motivation

Be able to test Vulkan lowering via optimum-executorch.

## Context

Very similar to the below PR, Int4 weight only quantization is currently enabled in Vulkan via a custom source transform quantizer that replaces linear layers with a custom linear layer that calls a custom weight only quantized linear op.

This diff aims to make it so that no Vulkan specific source transforms need to be applied by adding a fusion pattern for weight only quantized linear.


## Changes

* Introduce a fusable graph pattern for weight only quantized linear
* Add fusion logic for weight only quantized linear in the fuse patterns pass
* Add `4w` qmode to the export llama script

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

[ghstack-poisoned]
SS-JIA pushed a commit that referenced this pull request Aug 15, 2025
Pull Request resolved: #13452

## Motivation

Be able to test Vulkan lowering via optimum-executorch.

## Context

Very similar to the below PR, Int4 weight only quantization is currently enabled in Vulkan via a custom source transform quantizer that replaces linear layers with a custom linear layer that calls a custom weight only quantized linear op.

This diff aims to make it so that no Vulkan specific source transforms need to be applied by adding a fusion pattern for weight only quantized linear.


## Changes

* Introduce a fusable graph pattern for weight only quantized linear
* Add fusion logic for weight only quantized linear in the fuse patterns pass
* Add `4w` qmode to the export llama script
ghstack-source-id: 303313326

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

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

## Motivation

Be able to test Vulkan lowering via optimum-executorch.

## Context

Very similar to the below PR, Int4 weight only quantization is currently enabled in Vulkan via a custom source transform quantizer that replaces linear layers with a custom linear layer that calls a custom weight only quantized linear op.

This diff aims to make it so that no Vulkan specific source transforms need to be applied by adding a fusion pattern for weight only quantized linear.


## Changes

* Introduce a fusable graph pattern for weight only quantized linear
* Add fusion logic for weight only quantized linear in the fuse patterns pass
* Add `4w` qmode to the export llama script

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

[ghstack-poisoned]
SS-JIA pushed a commit that referenced this pull request Aug 15, 2025
Pull Request resolved: #13452

## Motivation

Be able to test Vulkan lowering via optimum-executorch.

## Context

Very similar to the below PR, Int4 weight only quantization is currently enabled in Vulkan via a custom source transform quantizer that replaces linear layers with a custom linear layer that calls a custom weight only quantized linear op.

This diff aims to make it so that no Vulkan specific source transforms need to be applied by adding a fusion pattern for weight only quantized linear.


## Changes

* Introduce a fusable graph pattern for weight only quantized linear
* Add fusion logic for weight only quantized linear in the fuse patterns pass
* Add `4w` qmode to the export llama script
ghstack-source-id: 303328940

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

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

## Motivation

Be able to test Vulkan lowering via optimum-executorch.

## Context

Very similar to the below PR, Int4 weight only quantization is currently enabled in Vulkan via a custom source transform quantizer that replaces linear layers with a custom linear layer that calls a custom weight only quantized linear op.

This diff aims to make it so that no Vulkan specific source transforms need to be applied by adding a fusion pattern for weight only quantized linear.


## Changes

* Introduce a fusable graph pattern for weight only quantized linear
* Add fusion logic for weight only quantized linear in the fuse patterns pass
* Add `4w` qmode to the export llama script

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

[ghstack-poisoned]
SS-JIA pushed a commit that referenced this pull request Aug 15, 2025
Pull Request resolved: #13452

## Motivation

Be able to test Vulkan lowering via optimum-executorch.

## Context

Very similar to the below PR, Int4 weight only quantization is currently enabled in Vulkan via a custom source transform quantizer that replaces linear layers with a custom linear layer that calls a custom weight only quantized linear op.

This diff aims to make it so that no Vulkan specific source transforms need to be applied by adding a fusion pattern for weight only quantized linear.


## Changes

* Introduce a fusable graph pattern for weight only quantized linear
* Add fusion logic for weight only quantized linear in the fuse patterns pass
* Add `4w` qmode to the export llama script
ghstack-source-id: 303387280

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

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

@facebook-github-bot facebook-github-bot merged commit 6bef39c into gh/SS-JIA/288/base Aug 16, 2025
102 of 106 checks passed
@facebook-github-bot facebook-github-bot deleted the gh/SS-JIA/288/head branch August 16, 2025 01:14
SS-JIA pushed a commit that referenced this pull request Aug 16, 2025
Pull Request resolved: #13452

## Motivation

Be able to test Vulkan lowering via optimum-executorch.

## Context

Very similar to the below PR, Int4 weight only quantization is currently enabled in Vulkan via a custom source transform quantizer that replaces linear layers with a custom linear layer that calls a custom weight only quantized linear op.

This diff aims to make it so that no Vulkan specific source transforms need to be applied by adding a fusion pattern for weight only quantized linear.


## Changes

* Introduce a fusable graph pattern for weight only quantized linear
* Add fusion logic for weight only quantized linear in the fuse patterns pass
* Add `4w` qmode to the export llama script
ghstack-source-id: 303387280

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants