Skip to content

Remove unused functions for quantization handling #7700

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
Jan 17, 2025

Conversation

per
Copy link
Collaborator

@per per commented Jan 16, 2025

Remove functions not used for searching/finding quantization information.

cc @digantdesai @freddan80 @zingo @oscarandersson8218

Remove functions not used for searching/finding quantization information.

Signed-off-by: Per Åstrand <[email protected]>
Change-Id: I5917e8b447dc21be78e79b2b0477c321fa09e262
Copy link

pytorch-bot bot commented Jan 16, 2025

🔗 Helpful Links

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

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

❌ 2 New Failures, 3 Cancelled Jobs

As of commit 0d4abcc with merge base d1b33cb (image):

NEW FAILURES - The following jobs have failed:

CANCELLED JOBS - The following jobs were cancelled. Please retry:

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 Jan 16, 2025
@per per added partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm ciflow/trunk topic: not user facing CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. and removed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels Jan 16, 2025
@zingo
Copy link
Collaborator

zingo commented Jan 16, 2025

Probably just need to be rebased as set_quantize_io() was removed in d1b33cb
(merged a short while ago)

@oscarandersson8218 oscarandersson8218 merged commit ffc2020 into pytorch:main Jan 17, 2025
103 of 110 checks passed
oscarandersson8218 added a commit that referenced this pull request Jan 17, 2025
oscarandersson8218 added a commit that referenced this pull request Jan 17, 2025
Revert "Remove unused functions for quantization handling (#7700)"

This reverts commit ffc2020.
@per per deleted the cleanup_unused_functions branch January 17, 2025 10:49
@shoumikhin
Copy link
Contributor

shoumikhin commented Jan 22, 2025

@per @oscarandersson8218 hi folks, can you please check if this or any of your recent changes could have caused the following test failure:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/Users/shoumikhin/Temp/executorch/examples/xnnpack/aot_compiler.py", line 110, in <module>
    exec_prog = edge.to_executorch(
                ^^^^^^^^^^^^^^^^^^^
  File "/Users/shoumikhin/Temp/executorch/.venv/lib/python3.12/site-packages/executorch/exir/program/_program.py", line 99, in wrapper
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/shoumikhin/Temp/executorch/.venv/lib/python3.12/site-packages/executorch/exir/program/_program.py", line 1385, in to_executorch
    new_gm_res = p(new_gm)
                 ^^^^^^^^^
  File "/Users/shoumikhin/Temp/executorch/.venv/lib/python3.12/site-packages/torch/fx/passes/infra/pass_base.py", line 44, in __call__
    res = self.call(graph_module)
          ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/shoumikhin/Temp/executorch/.venv/lib/python3.12/site-packages/executorch/exir/passes/__init__.py", line 427, in call
    raise RuntimeError(f"Missing out variants: {missing_out_vars}")
RuntimeError: Missing out variants: {'quantized_decomposed::dequantize_per_tensor', 'quantized_decomposed::quantize_per_tensor'}

Here's how you can reproduce it on the latest main branch:

git clone https://github.com/pytorch/executorch.git --depth 1 --recurse-submodules --shallow-submodules
cd executorch

python3 -m venv .venv && source .venv/bin/activate && pip install --upgrade pip

./install_executorch.sh --pybind xnnpack # install any missing pip dep manually if this script currently fails

python3 -m examples.xnnpack.aot_compiler --model_name=emformer_transcribe --delegate --quantize

For context, our CI signals were lagging at the time this PR landed, so we couldn't catch it earlier, and now they're back and reveal some failures like above.

Thanks!

huydhn added a commit that referenced this pull request Jan 23, 2025
@per
Copy link
Collaborator Author

per commented Jan 23, 2025

@shoumikhin Is there anything that led you in the direction to this PR? It only removes deprecated functions used for the serialization to TOSA Flatbuffer format used for the Ethos-U NPU.

@shoumikhin
Copy link
Contributor

@per yeah, this PR likely has nothing to do with that CI failure.

YIWENX14 pushed a commit that referenced this pull request Jan 28, 2025
Remove functions not used for searching/finding quantization information.


Signed-off-by: Per Åstrand <[email protected]>
YIWENX14 pushed a commit that referenced this pull request Jan 28, 2025
Revert "Remove unused functions for quantization handling (#7700)"

This reverts commit ffc2020.
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 topic: not user facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants