Skip to content

[CoreML Backend] Update coreml runner to only profile model when prof… #2574

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

Closed
wants to merge 1 commit into from

Conversation

cymbalrush
Copy link
Contributor

The CoreML executor would profile the model by default, this causes an issue when the installed sdk < 14.4. Model execution fails as profiling is only available for >= 14.4 and on older sdk it returns an error.

This addresses the issue by fixing the default option and only profiling when profiling_model option is set.

Copy link

pytorch-bot bot commented Mar 21, 2024

🔗 Helpful Links

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

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

❌ 13 New Failures, 31 Unrelated Failures

As of commit 6990acd with merge base 3152d7f (image):

NEW FAILURES - The following jobs have failed:

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 Mar 21, 2024
@cymbalrush
Copy link
Contributor Author

@pytorchbot label ciflow/trunk

Copy link

pytorch-bot bot commented Mar 21, 2024

Can't add following labels to PR: ciflow/trunk. Please ping one of the reviewers for help.

@cymbalrush
Copy link
Contributor Author

@guangy10 I am unable to add ciflow/trunk label, any suggestions?

@guangy10
Copy link
Contributor

@guangy10 I am unable to add ciflow/trunk label, any suggestions?

@cymbalrush I'm a bit surprised that you were not added to the repo as a contributor. Just added you in. Can you try it again?

@cymbalrush
Copy link
Contributor Author

@pytorchbot label ciflow/trunk

Copy link

pytorch-bot bot commented Mar 22, 2024

Can't add following labels to PR: ciflow/trunk. Please ping one of the reviewers for help.

@cymbalrush
Copy link
Contributor Author

@guangy10 still the same issue

@cymbalrush
Copy link
Contributor Author

@pytorchbot label ciflow/trunk

Copy link

pytorch-bot bot commented Mar 22, 2024

Can't add following labels to PR: ciflow/trunk. Please ping one of the reviewers for help.

@guangy10
Copy link
Contributor

Can't add following labels to PR: ciflow/trunk. Please ping one of the reviewers for help.

@cymbalrush will add that tag to unblock. At meanwhile @huydhn can you take a look?

@huydhn
Copy link
Contributor

huydhn commented Mar 22, 2024

We have tighten the security when it comes to running CI jobs recently, if you don't have write access to the repo, the CI will not be run by default. You will need to ask the reviewer to approve CI run explicitly, i.e.

Screenshot 2024-03-21 at 18 48 56

Once this is approved, then attaching ciflow/trunk can be added to start trunk jobs. Note that updating the PR by pushing a new commit will invalidate the approval and a new approval is needed.

cc @guangy10 For regular contributors to ET that have a proven record, you could consider granting them write access to the repo, then they will not need to ask for CI approval.

@guangy10
Copy link
Contributor

We have tighten the security when it comes to running CI jobs recently, if you don't have write access to the repo, the CI will not be run by default. You will need to ask the reviewer to approve CI run explicitly, i.e.

@huydhn Oh, this is sad as relying on pytorchbot to kick off trunk/periodic jobs will be meaningless. That doesn't sound a good move, especially for ET which is not in GH1st.

@guangy10
Copy link
Contributor

@cymbalrush FYI, I granted you the write permission to unblock.

@cymbalrush
Copy link
Contributor Author

Thanks @guangy10 @huydhn !

@cymbalrush
Copy link
Contributor Author

cymbalrush commented Mar 22, 2024

I am seeing failures unrelated to the PR, the changes in the PR just touch the CoreML runner, the failure is happening at quant_fusion_pass.py

packages/executorch/exir/passes/init.py", line 45, in
from executorch.exir.passes.quant_fusion_pass import QuantFusionPass
File "/Users/runner/work/_temp/conda_environment_8384223477/lib/python3.11/site-packages/executorch/exir/passes/quant_fusion_pass.py", line 14, in
from ._quant_patterns_and_replacements import get_quant_patterns_and_replacements
File "/Users/runner/work/_temp/conda_environment_8384223477/lib/python3.11/site-packages/executorch/exir/passes/_quant_patterns_and_replacements.py", line 17, in
from torchao.quantization.quant_primitives import quantized_decomposed_lib
File "/Users/runner/work/_temp/conda_environment_8384223477/lib/python3.11/site-packages/torchao/quantization/init.py", line 7, in
from .smoothquant import * # noqa: F403
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/runner/work/_temp/conda_environment_8384223477/lib/python3.11/site-packages/torchao/quantization/smoothquant.py", line 17, in
import torchao.quantization.quant_api as quant_api
File "/Users/runner/work/_temp/conda_environment_8384223477/lib/python3.11/site-packages/torchao/quantization/quant_api.py", line 25, in
from .dynamic_quant import DynamicallyPerAxisQuantizedLinear
File "/Users/runner/work/_temp/conda_environment_8384223477/lib/python3.11/site-packages/torchao/quantization/dynamic_quant.py", line 9, in
from .quant_primitives import (
File "/Users/runner/work/_temp/conda_environment_8384223477/lib/python3.11/site-packages/torchao/quantization/quant_primitives.py", line 19, in
from torchao.kernel.intmm_triton import int_scaled_matmul
File "/Users/runner/work/_temp/conda_environment_8384223477/lib/python3.11/site-packages/torchao/kernel/intmm_triton.py", line 6, in
import triton

@cymbalrush cymbalrush force-pushed the fix_runner_model_failure branch from c9afd57 to 8487a33 Compare March 22, 2024 05:31
@cymbalrush
Copy link
Contributor Author

@pytorchbot label ciflow/trunk

@guangy10
Copy link
Contributor

I am seeing failures unrelated to the PR, the changes in the PR just touch the CoreML runner, the failure is happening at quant_fusion_pass.py

packages/executorch/exir/passes/init.py", line 45, in from executorch.exir.passes.quant_fusion_pass import QuantFusionPass File "/Users/runner/work/_temp/conda_environment_8384223477/lib/python3.11/site-packages/executorch/exir/passes/quant_fusion_pass.py", line 14, in from ._quant_patterns_and_replacements import get_quant_patterns_and_replacements File "/Users/runner/work/_temp/conda_environment_8384223477/lib/python3.11/site-packages/executorch/exir/passes/_quant_patterns_and_replacements.py", line 17, in from torchao.quantization.quant_primitives import quantized_decomposed_lib File "/Users/runner/work/_temp/conda_environment_8384223477/lib/python3.11/site-packages/torchao/quantization/init.py", line 7, in from .smoothquant import * # noqa: F403 ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/runner/work/_temp/conda_environment_8384223477/lib/python3.11/site-packages/torchao/quantization/smoothquant.py", line 17, in import torchao.quantization.quant_api as quant_api File "/Users/runner/work/_temp/conda_environment_8384223477/lib/python3.11/site-packages/torchao/quantization/quant_api.py", line 25, in from .dynamic_quant import DynamicallyPerAxisQuantizedLinear File "/Users/runner/work/_temp/conda_environment_8384223477/lib/python3.11/site-packages/torchao/quantization/dynamic_quant.py", line 9, in from .quant_primitives import ( File "/Users/runner/work/_temp/conda_environment_8384223477/lib/python3.11/site-packages/torchao/quantization/quant_primitives.py", line 19, in from torchao.kernel.intmm_triton import int_scaled_matmul File "/Users/runner/work/_temp/conda_environment_8384223477/lib/python3.11/site-packages/torchao/kernel/intmm_triton.py", line 6, in import triton

@cymbalrush That's irrelevant and it's an known issue that the team is proactively working on. Maybe rebase and test off the stable branch (git checkout viable/strict), however, the stable branch is behind 1 week so I'm not sure it would be helpful. Or if this is a small fix and you are confident about it, we can merge it w/o waiting for the triton dep issue being resolved

@cymbalrush cymbalrush force-pushed the fix_runner_model_failure branch from 8487a33 to 6990acd Compare March 22, 2024 20:04
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

@shoumikhin merged this pull request in 8532e79.

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. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants