[CoreML] Add support for running statefule model.#5143
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/5143
Note: Links to docs will display an error until the docs builds have been completed. ❌ 3 New Failures, 1 Unrelated FailureAs of commit aef0bc5 with merge base 9739609 ( NEW FAILURES - The following jobs have failed:
FLAKY - The following job failed but was likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
5082a92 to
0ad2266
Compare
|
Thanks! How do we test it? |
I will add a unit test but have to wait for @YifanShenSZ coremltools changes to be available. |
Great! Looks like the coreml related tests are failing. What's your preference here? Should we want for coremltools update before merging this change? |
0ad2266 to
dfc629e
Compare
I am fixing the tests, it's API availability issue. The change shouldn't break anything. |
dfc629e to
aef0bc5
Compare
|
@cccclai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
Looks great. Thank you |
Add support for running stateful model. On iOS18 CoreML has a new API
predictionFromFeatures:usingState:options:errorthat supports model state. The runtime change makes sure to call the new API if the model has state otherwise it uses the old API.Testing:
Did local testing. To generate the test model I am waiting on the coremltools change to be publicly available.