Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/23392
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 1beeef8 with merge base 0b3d26d ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
metascroy
force-pushed
the
coreai-v2/05a-load-coordinator
branch
from
October 4, 2026 19:48
2f63441 to
12fd39f
Compare
Summary:
Acquire a prepared Core AI model for a selected bundle: restore it from the
persisted bookmark, or materialize the source and specialize it.
- `runtime/coreai_load_coordinator.{h,mm}`: `acquire_bookmark_model` restores
from the persisted bookmark, or on a miss materializes the source and
specializes it with the persistent default SDK cache, then publishes the
new bookmark atomically. Restore errors fail without a source fallback.
Sources and SDK pins are retained across completion.
- Tests: an acquisition-only fake SDK loader
(`runtime/test/coreai_fake_loader.{h,mm}`) lets the coordinator run in
`coreai_host_test` without Swift or CoreAI. The acquisition suite calls
`acquire_bookmark_model` directly and covers cold specialization, warm
restores, restore errors and misses, bookmark-save failures, contention on
one key versus independent keys across processes, and a crash after the
SDK call.
- The backend that uses this lands separately.
- README: the "Asset storage" acquisition flow.
No changes outside `backends/apple/coreai`.
Test Plan:
```
# Local: configure and build only
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_OSX_DEPLOYMENT_TARGET=27.0 -DEXECUTORCH_BUILD_COREAI=ON \
-DEXECUTORCH_BUILD_TESTS=ON -DEXECUTORCH_BUILD_EXTENSION_DATA_LOADER=ON
cmake --build build --target backends/apple/coreai/all
# CI (macOS 27 runner, .github/workflows/coreai.yml)
ctest --test-dir build/backends/apple/coreai --output-on-failure --no-tests=error
```
CTest runs `coreai_host_test` (adding the acquisition suite) and
`coreai_swift_bridge_test`.
metascroy
force-pushed
the
coreai-v2/04-sdk-bridge
branch
from
October 5, 2026 03:14
dae7df4 to
756e906
Compare
metascroy
force-pushed
the
coreai-v2/05a-load-coordinator
branch
from
October 5, 2026 03:14
12fd39f to
1beeef8
Compare
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Acquires a prepared Core AI model for a selected bundle: restore it from the persisted bookmark, or materialize the source and specialize it (
runtime/coreai_load_coordinator.{h,mm}).acquire_bookmark_modelrestores from the persisted bookmark; on a miss it materializes the source, specializes it with the persistent default SDK cache and publishes the new bookmark atomically.runtime/test/coreai_fake_loader.{h,mm}) runs the coordinator incoreai_host_testwithout Swift or CoreAI.acquire_bookmark_modeldirectly: cold specialization, warm restores, restore errors and misses, bookmark-save failures, same-key versus independent-key contention across processes, and a crash after the SDK call.No changes outside
backends/apple/coreai.Stack: 6 of 9, based on #23391. Review only this PR's commit. Next: #23393.
Test plan: built locally for macOS 27.0;
ctest -Nlistscoreai_host_testandcoreai_swift_bridge_test, which the Core AI workflow runs on the macOS 27 runner.lintrunneris clean.