Skip to content

Conversation

eigen-k
Copy link
Contributor

@eigen-k eigen-k commented Jun 16, 2025

Summary:
This diff

  1. extends export_to_edge() with apply_prelowering_passes() call
    We need this to grab the actual mul argument value and fusing in later passes. Otherwise, the constant gets lifted by _lower_ep_to_edge()
  2. implements e2e mul fusion test.
    We test that both ReplaceMulTensorWithMulAndFullOpsPass() and FuseMulTensorIntoQuantPass() passes get applied correctly and which results into mul.Tensor being removed completely.

Reviewed By: hsharma35

Differential Revision: D76469613

Copy link

pytorch-bot bot commented Jun 16, 2025

🔗 Helpful Links

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

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

❌ 1 Cancelled Job, 2 Unrelated Failures

As of commit 38c5b5b with merge base bf4acb3 (image):

CANCELLED JOB - The following job was cancelled. Please retry:

BROKEN TRUNK - The following jobs failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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 Jun 16, 2025
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

@eigen-k eigen-k force-pushed the export-D76469613 branch from 49e1e96 to d86f728 Compare June 16, 2025 23:13
eigen-k added a commit to eigen-k/executorch that referenced this pull request Jun 16, 2025
…#11741)

Summary:
Pull Request resolved: pytorch#11741

This diff
1) extends export_to_edge() with apply_prelowering_passes() call
We need this to grab the actual mul argument value and fusing in later passes. Otherwise, the constant gets lifted by _lower_ep_to_edge()
2) implements e2e mul fusion test.
We test that both ReplaceMulTensorWithMulAndFullOpsPass() and FuseMulTensorIntoQuantPass() passes get applied correctly and which results into mul.Tensor being removed completely.

Reviewed By: hsharma35

Differential Revision: D76469613
@eigen-k eigen-k added the release notes: none Do not include this in the release notes label Jun 16, 2025
@facebook-github-bot
Copy link
Contributor

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

eigen-k added a commit to eigen-k/executorch that referenced this pull request Jun 16, 2025
…#11741)

Summary:
Pull Request resolved: pytorch#11741

This diff
1) extends export_to_edge() with apply_prelowering_passes() call
We need this to grab the actual mul argument value and fusing in later passes. Otherwise, the constant gets lifted by _lower_ep_to_edge()
2) implements e2e mul fusion test.
We test that both ReplaceMulTensorWithMulAndFullOpsPass() and FuseMulTensorIntoQuantPass() passes get applied correctly and which results into mul.Tensor being removed completely.

Reviewed By: hsharma35

Differential Revision: D76469613
@eigen-k eigen-k force-pushed the export-D76469613 branch from d86f728 to 1903db9 Compare June 16, 2025 23:25
@facebook-github-bot
Copy link
Contributor

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

eigen-k added a commit to eigen-k/executorch that referenced this pull request Jun 16, 2025
…#11741)

Summary:
Pull Request resolved: pytorch#11741

This diff
1) extends export_to_edge() with apply_prelowering_passes() call
We need this to grab the actual mul argument value and fusing in later passes. Otherwise, the constant gets lifted by _lower_ep_to_edge()
2) implements e2e mul fusion test.
We test that both ReplaceMulTensorWithMulAndFullOpsPass() and FuseMulTensorIntoQuantPass() passes get applied correctly and which results into mul.Tensor being removed completely.

Reviewed By: hsharma35

Differential Revision: D76469613
@eigen-k eigen-k force-pushed the export-D76469613 branch from 1903db9 to ba3a5a9 Compare June 16, 2025 23:31
@facebook-github-bot
Copy link
Contributor

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

@eigen-k eigen-k force-pushed the export-D76469613 branch from ba3a5a9 to ccc998e Compare June 17, 2025 17:40
eigen-k added a commit to eigen-k/executorch that referenced this pull request Jun 17, 2025
…#11741)

Summary:
Pull Request resolved: pytorch#11741

This diff
1) extends export_to_edge() with apply_prelowering_passes() call
We need this to grab the actual mul argument value and fusing in later passes. Otherwise, the constant gets lifted by _lower_ep_to_edge()
2) implements e2e mul fusion test.
We test that both ReplaceMulTensorWithMulAndFullOpsPass() and FuseMulTensorIntoQuantPass() passes get applied correctly and which results into mul.Tensor being removed completely.

Reviewed By: hsharma35

Differential Revision: D76469613
@facebook-github-bot
Copy link
Contributor

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

eigen-k added a commit to eigen-k/executorch that referenced this pull request Jun 17, 2025
Summary:
Pull Request resolved: pytorch#11741

This diff
1) extends export_to_edge() with apply_torch_ops_passes() call
We need this to grab the actual mul argument value and fusing in later passes. Otherwise, the constant gets lifted by _lower_ep_to_edge()
2) implements e2e mul fusion test.
We test that both ReplaceMulTensorWithMulAndFullOpsPass() and FuseMulTensorIntoQuantPass() passes get applied correctly and which results into mul.Tensor being removed completely.

Reviewed By: hsharma35

Differential Revision: D76469613
@eigen-k eigen-k force-pushed the export-D76469613 branch from ccc998e to 15873c3 Compare June 17, 2025 18:03
@facebook-github-bot
Copy link
Contributor

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

@eigen-k eigen-k force-pushed the export-D76469613 branch from 15873c3 to 2efa68a Compare June 17, 2025 18:23
@eigen-k eigen-k force-pushed the export-D76469613 branch from 2efa68a to 22b0811 Compare July 3, 2025 19:58
eigen-k added a commit to eigen-k/executorch that referenced this pull request Jul 3, 2025
Summary:

This diff 
1) extends export_to_edge() with apply_torch_ops_passes() call
We need this to grab the actual mul argument value and fusing in later passes. Otherwise, the constant gets lifted by _lower_ep_to_edge() 
2) implements e2e mul fusion test.
We test that both ReplaceMulTensorWithMulAndFullOpsPass() and FuseMulTensorIntoQuantPass() passes get applied correctly and which results into mul.Tensor being removed completely.

Reviewed By: hsharma35

Differential Revision: D76469613
@facebook-github-bot
Copy link
Contributor

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

eigen-k added a commit to eigen-k/executorch that referenced this pull request Jul 3, 2025
Summary:

This diff 
1) extends export_to_edge() with apply_torch_ops_passes() call
We need this to grab the actual mul argument value and fusing in later passes. Otherwise, the constant gets lifted by _lower_ep_to_edge() 
2) implements e2e mul fusion test.
We test that both ReplaceMulTensorWithMulAndFullOpsPass() and FuseMulTensorIntoQuantPass() passes get applied correctly and which results into mul.Tensor being removed completely.

Reviewed By: hsharma35

Differential Revision: D76469613
@eigen-k eigen-k force-pushed the export-D76469613 branch from 22b0811 to de7a8db Compare July 3, 2025 20:22
@facebook-github-bot
Copy link
Contributor

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

@eigen-k eigen-k force-pushed the export-D76469613 branch from de7a8db to 561ae71 Compare July 8, 2025 18:17
eigen-k added a commit to eigen-k/executorch that referenced this pull request Jul 8, 2025
Summary:

This diff 
1) extends export_to_edge() with apply_torch_ops_passes() call
We need this to grab the actual mul argument value and fusing in later passes. Otherwise, the constant gets lifted by _lower_ep_to_edge() 
2) implements e2e mul fusion test.
We test that both ReplaceMulTensorWithMulAndFullOpsPass() and FuseMulTensorIntoQuantPass() passes get applied correctly and which results into mul.Tensor being removed completely.

Reviewed By: hsharma35

Differential Revision: D76469613
@facebook-github-bot
Copy link
Contributor

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

eigen-k added a commit to eigen-k/executorch that referenced this pull request Jul 8, 2025
Summary:
Pull Request resolved: pytorch#11741

This diff
1) extends export_to_edge() with apply_torch_ops_passes() call
We need this to grab the actual mul argument value and fusing in later passes. Otherwise, the constant gets lifted by _lower_ep_to_edge()
2) implements e2e mul fusion test.
We test that both ReplaceMulTensorWithMulAndFullOpsPass() and FuseMulTensorIntoQuantPass() passes get applied correctly and which results into mul.Tensor being removed completely.

Reviewed By: hsharma35

Differential Revision: D76469613
@eigen-k eigen-k force-pushed the export-D76469613 branch from 57dbe1e to 6c7d1cc Compare July 8, 2025 18:30
eigen-k added a commit to eigen-k/executorch that referenced this pull request Jul 8, 2025
Summary:

This diff 
1) extends export_to_edge() with apply_torch_ops_passes() call
We need this to grab the actual mul argument value and fusing in later passes. Otherwise, the constant gets lifted by _lower_ep_to_edge() 
2) implements e2e mul fusion test.
We test that both ReplaceMulTensorWithMulAndFullOpsPass() and FuseMulTensorIntoQuantPass() passes get applied correctly and which results into mul.Tensor being removed completely.

Reviewed By: hsharma35

Differential Revision: D76469613
@eigen-k eigen-k force-pushed the export-D76469613 branch from 6c7d1cc to c00b47c Compare July 8, 2025 21:38
@facebook-github-bot
Copy link
Contributor

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

eigen-k added a commit to eigen-k/executorch that referenced this pull request Jul 8, 2025
Summary:
Pull Request resolved: pytorch#11741

This diff
1) extends export_to_edge() with apply_torch_ops_passes() call
We need this to grab the actual mul argument value and fusing in later passes. Otherwise, the constant gets lifted by _lower_ep_to_edge()
2) implements e2e mul fusion test.
We test that both ReplaceMulTensorWithMulAndFullOpsPass() and FuseMulTensorIntoQuantPass() passes get applied correctly and which results into mul.Tensor being removed completely.

Reviewed By: hsharma35

Differential Revision: D76469613
@eigen-k eigen-k force-pushed the export-D76469613 branch 2 times, most recently from 853e63a to c0175e7 Compare July 9, 2025 18:22
eigen-k added a commit to eigen-k/executorch that referenced this pull request Jul 9, 2025
Summary:

This diff 
1) extends export_to_edge() with apply_torch_ops_passes() call
We need this to grab the actual mul argument value and fusing in later passes. Otherwise, the constant gets lifted by _lower_ep_to_edge() 
2) implements e2e mul fusion test.
We test that both ReplaceMulTensorWithMulAndFullOpsPass() and FuseMulTensorIntoQuantPass() passes get applied correctly and which results into mul.Tensor being removed completely.

Reviewed By: hsharma35

Differential Revision: D76469613
eigen-k added a commit to eigen-k/executorch that referenced this pull request Jul 9, 2025
Summary:

This diff 
1) extends export_to_edge() with apply_torch_ops_passes() call
We need this to grab the actual mul argument value and fusing in later passes. Otherwise, the constant gets lifted by _lower_ep_to_edge() 
2) implements e2e mul fusion test.
We test that both ReplaceMulTensorWithMulAndFullOpsPass() and FuseMulTensorIntoQuantPass() passes get applied correctly and which results into mul.Tensor being removed completely.

Reviewed By: hsharma35

Differential Revision: D76469613
@eigen-k eigen-k force-pushed the export-D76469613 branch from c0175e7 to 977cbe4 Compare July 9, 2025 18:25
@facebook-github-bot
Copy link
Contributor

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

1 similar comment
@facebook-github-bot
Copy link
Contributor

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

eigen-k added a commit to eigen-k/executorch that referenced this pull request Jul 9, 2025
Summary:
Pull Request resolved: pytorch#11741

This diff
1) extends export_to_edge() with apply_torch_ops_passes() call
We need this to grab the actual mul argument value and fusing in later passes. Otherwise, the constant gets lifted by _lower_ep_to_edge()
2) implements e2e mul fusion test.
We test that both ReplaceMulTensorWithMulAndFullOpsPass() and FuseMulTensorIntoQuantPass() passes get applied correctly and which results into mul.Tensor being removed completely.

Reviewed By: hsharma35

Differential Revision: D76469613
@eigen-k eigen-k force-pushed the export-D76469613 branch from 977cbe4 to d0ca638 Compare July 9, 2025 18:28
eigen-k added a commit to eigen-k/executorch that referenced this pull request Jul 9, 2025
Summary:

This diff 
1) extends export_to_edge() with apply_torch_ops_passes() call
We need this to grab the actual mul argument value and fusing in later passes. Otherwise, the constant gets lifted by _lower_ep_to_edge() 
2) implements e2e mul fusion test.
We test that both ReplaceMulTensorWithMulAndFullOpsPass() and FuseMulTensorIntoQuantPass() passes get applied correctly and which results into mul.Tensor being removed completely.

Reviewed By: hsharma35

Differential Revision: D76469613
@eigen-k eigen-k force-pushed the export-D76469613 branch from d0ca638 to 8ed1ff2 Compare July 9, 2025 22:22
@facebook-github-bot
Copy link
Contributor

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

eigen-k added a commit to eigen-k/executorch that referenced this pull request Jul 9, 2025
Summary:

This diff 
1) extends export_to_edge() with apply_torch_ops_passes() call
We need this to grab the actual mul argument value and fusing in later passes. Otherwise, the constant gets lifted by _lower_ep_to_edge() 
2) implements e2e mul fusion test.
We test that both ReplaceMulTensorWithMulAndFullOpsPass() and FuseMulTensorIntoQuantPass() passes get applied correctly and which results into mul.Tensor being removed completely.

Reviewed By: hsharma35

Differential Revision: D76469613
@eigen-k eigen-k force-pushed the export-D76469613 branch from 8ed1ff2 to 9a56264 Compare July 9, 2025 22:33
@facebook-github-bot
Copy link
Contributor

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

eigen-k added a commit to eigen-k/executorch that referenced this pull request Jul 9, 2025
Summary:

This diff 
1) extends export_to_edge() with apply_torch_ops_passes() call
We need this to grab the actual mul argument value and fusing in later passes. Otherwise, the constant gets lifted by _lower_ep_to_edge() 
2) implements e2e mul fusion test.
We test that both ReplaceMulTensorWithMulAndFullOpsPass() and FuseMulTensorIntoQuantPass() passes get applied correctly and which results into mul.Tensor being removed completely.

Reviewed By: hsharma35

Differential Revision: D76469613
@eigen-k eigen-k force-pushed the export-D76469613 branch from 9a56264 to b83b358 Compare July 9, 2025 22:37
@facebook-github-bot
Copy link
Contributor

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

Summary:

This diff 
1) extends export_to_edge() with apply_torch_ops_passes() call
We need this to grab the actual mul argument value and fusing in later passes. Otherwise, the constant gets lifted by _lower_ep_to_edge() 
2) implements e2e mul fusion test.
We test that both ReplaceMulTensorWithMulAndFullOpsPass() and FuseMulTensorIntoQuantPass() passes get applied correctly and which results into mul.Tensor being removed completely.

Reviewed By: hsharma35

Differential Revision: D76469613
@eigen-k eigen-k force-pushed the export-D76469613 branch from b83b358 to 38c5b5b Compare July 9, 2025 22:59
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot facebook-github-bot merged commit 97a61f4 into pytorch:main Jul 10, 2025
94 of 99 checks passed
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: none Do not include this in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants