Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/23393
Note: Links to docs will display an error until the docs builds have been completed. ❌ 8 Cancelled Jobs, 3 Pending, 3 Unclassified FailuresAs of commit a6f16ff with merge base 0b3d26d ( UNCLASSIFIED FAILURES - DrCI could not classify the following jobs because the workflow did not run on the merge base. The failures may be pre-existing on trunk or introduced by this PR:
CANCELLED JOBS - The following jobs were cancelled. Please retry:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
metascroy
force-pushed
the
coreai-v2/05b-sdk-delegate
branch
from
October 4, 2026 19:48
c14c6ea to
836b175
Compare
metascroy
force-pushed
the
coreai-v2/05a-load-coordinator
branch
from
October 4, 2026 19:48
2f63441 to
12fd39f
Compare
Summary: Wire the Core AI bridge into an ExecuTorch `BackendInterface` so `CoreAIBackend` can load and run models. - `runtime/coreai_backend.mm`: the `BackendInterface`. `init` parses the manifest, checks the OS floor, selects the platform/architecture assets, acquires a prepared model through the load coordinator and binds the named function with ordered inputs/outputs. `execute` validates dtype (FP16/FP32), CPU storage, default dim order and contiguity, borrows input bytes without copying, then validates and resizes every output before copying any results. - Build: `backends/apple/coreai/CMakeLists.txt` builds `coreaidelegate` (static, or shared against `executorch_shared`) from the backend sources plus the `coreai_bridge_obj` objects, and links `coreai_swift`. The delegate and its test consumers link with the C++ linker, so ExecuTorch's C/C++ compile options never reach swiftc. - Tests: the fake bridge gains function binding, sessions and execution, plus the C entry points the backend calls, so the real backend runs in `coreai_host_test`. `coreai_runtime_smoke` checks final linkage, registration retention and availability; with `EXECUTORCH_BUILD_TESTS=ON` it is built and registered with CTest, otherwise it is excluded from the default build. - README: execution semantics, device-architecture selection, the default assets root, "Runtime options", and delegate linkage in "Building". `init` and `execute` block their calling thread on Swift concurrency work, so the README tells callers not to invoke them from Swift `async` code. Changes outside `backends/apple/coreai` are CMake only and, like the other backends, only take effect when `EXECUTORCH_BUILD_COREAI=ON`: - `tools/cmake/preset/default.cmake`: `EXECUTORCH_BUILD_COREAI` now requires the data loader extension. - `CMakeLists.txt`: add `coreaidelegate` to the backend list. 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 delegate suite), `coreai_swift_bridge_test` and `coreai_runtime_smoke`. The smoke binary needs OS 27, so locally it is built but not run.
metascroy
force-pushed
the
coreai-v2/05b-sdk-delegate
branch
from
October 5, 2026 03:14
836b175 to
a6f16ff
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.
Wires the Core AI bridge into an ExecuTorch
BackendInterfacesoCoreAIBackendcan load and run models (runtime/coreai_backend.mm).initparses the manifest, checks the OS floor, selects the platform/architecture assets, acquires a prepared model through the load coordinator and binds the named function with ordered inputs/outputs.executevalidates dtype (FP16/FP32), CPU storage, default dim order and contiguity, borrows input bytes without copying, then validates and resizes every output before copying any results.initandexecuteblock their calling thread on Swift concurrency work, so the README tells callers not to invoke them from Swiftasynccode.backends/apple/coreai/CMakeLists.txtbuildscoreaidelegate(static, or shared againstexecutorch_shared) from the backend sources pluscoreai_bridge_obj, linkingcoreai_swiftwith the C++ linker so ExecuTorch's C/C++ options never reach swiftc.coreai_host_test(delegate suite).coreai_runtime_smokechecks final linkage, registration retention and availability. WithEXECUTORCH_BUILD_TESTS=ONit is built and registered with CTest; otherwise it stays out of the default build.backends/apple/coreaiare CMake only and only take effect whenEXECUTORCH_BUILD_COREAI=ON:tools/cmake/preset/default.cmake:EXECUTORCH_BUILD_COREAIrequires the data loader extension.CMakeLists.txt: addcoreaidelegateto the backend list.Stack: 7 of 9, based on #23392. Review only this PR's commit. Next: #23394.
Test plan: built locally for macOS 27.0;
ctest -Nlistscoreai_host_test,coreai_swift_bridge_testandcoreai_runtime_smoke, which the Core AI workflow runs on the macOS 27 runner. The smoke binary needs OS 27, so it only runs there (first CI run of it).lintrunneris clean.