Skip to content

Conversation

@metascroy
Copy link
Contributor

@metascroy metascroy commented Dec 23, 2024

Previously when running a pte file that has model state, our CI would fail with an error like:

2024-12-19 14:15:43.359148-0800 Benchmark[532:16686] [coreml] The input feature for layers_10_attention_SDPA_kv_cache_v_cache must be an MLState, but it was not.

This is because if you build the xcode frameworks with xcode 15, the ExecuTorch CoreML backend is built to not handle MLState variables:

#if !defined(MODEL_STATE_IS_SUPPORTED) && __has_include(<CoreML/MLModel+MLState.h>)

Note the prebuilt frameworks cannot handle MLState (https://github.com/pytorch/executorch/tree/main/extension/benchmark/apple/Benchmark#set-up-the-frameworks).

This PR:

  • Edits the benchmark README.md to mention that Xcode 16.0 must be used to build frameworks that handle pte files that use CoreML MLState
  • Reenables using MLState for iOS18 models

@pytorch-bot
Copy link

pytorch-bot bot commented Dec 23, 2024

🔗 Helpful Links

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

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

❌ 6 New Failures

As of commit e195698 with merge base a727b55 (image):

NEW FAILURES - The following jobs have failed:

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 Dec 23, 2024
@github-actions
Copy link

This PR needs a release notes: label

If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

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

@metascroy metascroy changed the title init Handle model state in benchmark CI jobs Dec 24, 2024
@metascroy metascroy had a problem deploying to upload-benchmark-results December 24, 2024 01:59 — with GitHub Actions Failure
@metascroy metascroy had a problem deploying to upload-benchmark-results December 24, 2024 04:35 — with GitHub Actions Failure
@metascroy metascroy had a problem deploying to upload-benchmark-results December 24, 2024 04:57 — with GitHub Actions Failure
@metascroy metascroy marked this pull request as ready for review January 2, 2025 18:13
@metascroy
Copy link
Contributor Author

@guangy10 the apple-perf/build-benchmark-app job fails with "xcodebuild: error: Unable to find a device matching the provided destination specifier:2025-01-02T18:01:02.3778750Z { platform:iOS }"

Do you know what could cause this?

@metascroy metascroy had a problem deploying to upload-benchmark-results January 2, 2025 19:04 — with GitHub Actions Failure
Copy link
Contributor

@guangy10 guangy10 left a comment

Choose a reason for hiding this comment

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

Thanks @metascroy for improvement!

secrets: inherit
with:
runner: macos-latest-xlarge
runner: macos-15-xlarge
Copy link
Contributor

Choose a reason for hiding this comment

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

This runner is configured with Xcode 16.0 right? Does it work for all other models that running on iOS 17?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Most runners should have xcode 16, but you have to set the version line I do on line 333.

@metascroy
Copy link
Contributor Author

Thanks @metascroy for improvement!

@guangy10 do you understanding the failing build-benchmark-app errror in CI: apple-perf/build-benchmark-app job fails with "xcodebuild: error: Unable to find a device matching the provided destination specifier:2025-01-02T18:01:02.3778750Z { platform:iOS }"

@guangy10
Copy link
Contributor

Thanks @metascroy for improvement!

@guangy10 do you understanding the failing build-benchmark-app errror in CI: apple-perf/build-benchmark-app job fails with "xcodebuild: error: Unable to find a device matching the provided destination specifier:2025-01-02T18:01:02.3778750Z { platform:iOS }"

Can you share the job link? Can't find this error in the failed job. However, I'm seeing the missing stdlib errors again in pretty much all app builds, for example, https://github.com/pytorch/executorch/actions/runs/12586454085/job/35080314575?pr=7432 Maybe @shoumikhin can help with it?

@metascroy metascroy had a problem deploying to upload-benchmark-results January 15, 2025 22:57 — with GitHub Actions Failure
@guangy10
Copy link
Contributor

@guangy10 the apple-perf/build-benchmark-app job fails with "xcodebuild: error: Unable to find a device matching the provided destination specifier:2025-01-02T18:01:02.3778750Z { platform:iOS }"

Do you know what could cause this?

The required SDKROOT = iphoneos18.2, but no iPhone 15 from the device pool are equipped with 18.2? I'm not sure how the "Available destinations for the Benchmark scheme" is generated. @huydhn @shoumikhin do you know?

@cccclai cccclai added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Feb 7, 2025
@github-actions
Copy link

Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as Stale.
Feel free to remove the Stale label if you feel this was a mistake.
If you are unable to remove the Stale label please contact a maintainer in order to do so.
If you want the bot to never mark this PR stale again, add the no-stale label.
Stale pull requests will automatically be closed after 30 days of inactivity.

@github-actions github-actions bot added the stale PRs inactive for over 60 days label Aug 30, 2025
@github-actions
Copy link

Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as Stale.
Feel free to remove the Stale label if you feel this was a mistake.
If you are unable to remove the Stale label please contact a maintainer in order to do so.
If you want the bot to never mark this PR stale again, add the no-stale label.
Stale pull requests will automatically be closed after 30 days of inactivity.

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. stale PRs inactive for over 60 days triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants