Repository navigation
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/23389
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New FailureAs of commit d2e0ec4 with merge base 61ec450 ( NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
aa99feb to
7998984
Compare
f74a984 to
68a8b17
Compare
|
@claude review this PR |
|
Claude finished @metascroy's task in 2m 40s —— View job Summary: The bookmark storage itself looks correct, but this PR adds several functions nothing calls or tests yet (including the whole Detailed reviewPR Review: #23389SummaryThis PR adds raw bookmark persistence for Core AI: a key built from a hash of the manifest, platform and architecture, a per-key Testing
API Design
Code Quality
RecommendationNeeds Discussion. Nothing blocks on correctness. The main question is whether the unused |
68a8b17 to
65217f5
Compare
7998984 to
04a20e6
Compare
|
@claude review this code Updated head: Context on the previous findings: the non-creating lookup ( |
|
Claude finished @metascroy's task in 4m 11s —— View job Summary: The fixes from the last review (EINTR retries, Detailed reviewPR Review: #23389SummaryThis PR stores raw Core AI bookmarks under per-key Thread Safety
API Design
Testing
Code Quality
RecommendationApprove. Nothing here is a correctness bug in the current code paths. Two things should be fixed before downstream PRs build on this:
The contention tests also need a real "blocked in |
Summary:
Persist the raw SDK bookmark for a selected Core AI bundle, so later loads can
restore a specialized model without re-reading the payload.
- Bookmarks (`runtime/coreai_bookmarks.{h,mm}`): store raw opaque bookmarks
(at most 8 MiB) with atomic publication. Keys include the bundle digest,
platform, architecture and persistence policy, but not function bindings or
delivery location. Per-key OS locks coordinate threads and processes.
- SDK acquisition and cache removal are not included here.
- README: the "Asset storage" key derivation, bookmark bound and locking text.
Trust model: the application owns the assets root and is trusted not to modify
it while the backend uses it.
No changes outside `backends/apple/coreai`.
Test Plan:
```
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
ctest --test-dir build/backends/apple/coreai --output-on-failure --no-tests=error
```
CTest runs `coreai_host_test`, which adds the bookmark suite, including a
cross-process lock test that spawns child processes.
Exercise the maintenance and failure cases that later cache operations depend on, while preserving the existing staging contract. Handle interrupted reads consistently and remove redundant setup and validation work. Test Plan: Ran the native host suite on macOS 27: 61 tests passed; one existing test skipped because APFS rejects invalid UTF-8 filenames. The new bookmark tests covered noncreating lookups, staging, invalid stored files, and thread locking. The thread-contention test also passed 20 consecutive runs. Authored with assistance from Devmate (OpenAI GPT-6-Astra).
…tests Summary: Prevent waiting callers from using stale bookmark state after eviction. Make staging-only write failures explicit and ensure contention tests reach lock acquisition without hanging teardown. Clarify maintenance side effects and key identity. Test Plan: All 74 native tests passed with zero skips, including eviction-waiter and staging-only write regressions. Four contention/waiter tests passed 25 repetitions. All 113 CoreAI Python tests passed. Formatting and whitespace checks passed.
65217f5 to
afd4d5a
Compare
04a20e6 to
61a5f2d
Compare
Map validated cache keys to 256 on-demand, versioned lock files. Preserve flock exclusion, stable inodes, noncreating maintenance, and per-key data paths. Document quiescent upgrades and retain legacy locks without online deletion. Test Plan: Bookmark-layer coreai_host_test passed, including 1,024-key pool bounds, thread/process collisions, holder-death recovery, invalid stripe files, and legacy preservation. Full-stack validation before placement: 256 native tests, five CTest targets, and 124 Python tests passed.
Persists the raw SDK bookmark for a selected Core AI bundle, so later loads can restore a specialized model without re-reading the payload (
runtime/coreai_bookmarks.{h,mm}).coreai_host_test, including a cross-process lock test that spawns child processes.No changes outside
backends/apple/coreai.Stack: 3 of 9, based on #23388. Review only this PR's commit. Next: #23390.
Test plan: built locally for macOS 27.0;
ctest -Nlistscoreai_host_test, which the Core AI workflow runs on the macOS 27 runner.lintrunneris clean.