Skip to content

Arm backend: Add fold_quantize option to tester#18005

Merged
tom-arm merged 2 commits into
pytorch:mainfrom
tom-arm:add_fold_quantize_option
Mar 9, 2026
Merged

Arm backend: Add fold_quantize option to tester#18005
tom-arm merged 2 commits into
pytorch:mainfrom
tom-arm:add_fold_quantize_option

Conversation

@tom-arm
Copy link
Copy Markdown
Collaborator

@tom-arm tom-arm commented Mar 9, 2026

  • Enables tests to be run with fold_quantize = False when required
  • This is used when you do not want convert_pt2e to fold constants
  • Temporary solution to enable testing of StaticCache in INT8

Change-Id: Ib25ea3949fc5f539c1a0a15565c3cbfe5099b9a1

cc @digantdesai @SS-JIA @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell

* Enables tests to be run with fold_quantize = False when required
* This is used when you do not want convert_pt2e to fold constants
* Temporary solution to enable testing of StaticCache in INT8

Signed-off-by: Tom Allsop <tom.allsop@arm.com>
Change-Id: Ib25ea3949fc5f539c1a0a15565c3cbfe5099b9a1
@tom-arm tom-arm requested a review from digantdesai as a code owner March 9, 2026 11:29
Copilot AI review requested due to automatic review settings March 9, 2026 11:29
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Mar 9, 2026

🔗 Helpful Links

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

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

❌ 4 New Failures, 1 Pending

As of commit 949e14e with merge base 122fdef (image):

NEW FAILURES - The following jobs have failed:

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

@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 Mar 9, 2026
@tom-arm tom-arm added partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm ciflow/trunk release notes: none Do not include this in the release notes labels Mar 9, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a fold_quantize option to the Arm backend test pipeline infrastructure, allowing tests to optionally disable constant folding during quantization (convert_pt2e). This is described as a temporary solution to enable testing of StaticCache in INT8 where you don't want convert_pt2e to fold constants.

Changes:

  • Adds a fold_quantize parameter to ArmQuantize in quantize.py and threads it through to quantize_with_submodules
  • Adds fold_quantize parameter to quantize_with_submodules in arm_quantizer.py and passes it to convert_pt2e
  • Propagates the fold_quantize option through multiple pipeline classes in test_pipeline.py

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
backends/arm/test/tester/quantize.py Extends ArmQuantize with fold_quantize parameter, passes it to quantize_with_submodules
backends/arm/quantizer/arm_quantizer.py Adds fold_quantize parameter to quantize_with_submodules, forwards to convert_pt2e
backends/arm/test/tester/test_pipeline.py Threads fold_quantize through TosaPipelineINT, EthosUPipelineINTBase, EthosU55PipelineINT, EthosU85PipelineINT, QuantizationPipeline, and TosaPipelineMI pipeline classes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread backends/arm/test/tester/test_pipeline.py Outdated
Comment thread backends/arm/test/tester/test_pipeline.py Outdated
Comment thread backends/arm/test/tester/test_pipeline.py Outdated
Comment thread backends/arm/quantizer/arm_quantizer.py Outdated
Copy link
Copy Markdown
Collaborator

@zingo zingo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe fix the copilot name change fold_quantze -> fold_quantize already now?

Change-Id: Id2931f0a39a69a94d29b81729115fc54b765cde2
@tom-arm
Copy link
Copy Markdown
Collaborator Author

tom-arm commented Mar 9, 2026

Maybe fix the copilot name change fold_quantze -> fold_quantize already now?

I have implemented CoPilot's suggestions, so the review is ready now

@tom-arm
Copy link
Copy Markdown
Collaborator Author

tom-arm commented Mar 9, 2026

Failing jobs are unrelated

@tom-arm tom-arm merged commit 4ad6012 into pytorch:main Mar 9, 2026
312 of 317 checks passed
@tom-arm tom-arm deleted the add_fold_quantize_option branch March 9, 2026 14:59
jpiat pushed a commit to jpiat/executorch that referenced this pull request Mar 17, 2026
* Enables tests to be run with fold_quantize = False when required
* This is used when you do not want convert_pt2e to fold constants
* Temporary solution to enable testing of StaticCache in INT8


Change-Id: Ib25ea3949fc5f539c1a0a15565c3cbfe5099b9a1

cc @digantdesai @SS-JIA @freddan80 @per @zingo @oscarandersson8218
@mansnils @Sebastian-Larsson @robell

---------

Signed-off-by: Tom Allsop <tom.allsop@arm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm 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