Uh oh!
There was an error while loading. Please reload this page.
Export an MLX model for the iOS demo build - #22297
Merged
Merged
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/22297
Note: Links to docs will display an error until the docs builds have been completed. ❌ 3 New Failures, 1 Unclassified FailureAs of commit 037b6da with merge base 9b558d9 ( NEW FAILURES - The following jobs have failed:
UNCLASSIFIED FAILURE - DrCI could not classify the following job because the workflow did not run on the merge base. The failure may be pre-existing on trunk or introduced by this PR:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
JakeStevens
approved these changes
Aug 31, 2026
shoumikhinforce-pushed
the
ios-ci-mlx-export
branch
from
August 31, 2026 16:33
c9e6e49 to
38c89c8Compareshoumikhinforce-pushed
the
ios-ci-mlx-export
branch
from
August 31, 2026 16:38
38c89c8 to
8f3a770CompareThe mv3 demo app is gaining an MLX option. Once its Xcode project bundles mv3_mlx.pte, this job must produce that file or the build fails on a missing resource. This change must land first: it creates the file, and the demo side waits on it. If the demo landed first, its project would ask for a model this script does not yet produce and the iOS build would break. No generic examples/ entry point takes a model name and lowers it to MLX, so lower it inline the same way the script drives the portable, Core ML and XNNPACK exports. Do it in both iOS scripts, the way the MPS removal edited both together. The check reads the delegates off the program object and fails unless the model produced an MLX delegate. The partitioner only logs a warning when it delegates nothing and still returns a valid program, so without this a model with no MLX delegate would be staged under an MLX name and the demo would still pass on the portable kernels. The check runs before the file is written, so a program with no MLX delegate never lands next to the staged models. The lowering skips dim order because every MLX export in this tree does; the Core ML and XNNPACK exports skip it for their own backend reasons, which do not carry over. Test Plan: Ran the lowering and the delegate check against a delegated model: the count is 1 and the file is written; a non-delegated program gives 0 and the check fails before writing. Both scripts pass bash syntax and share one Python body.
shoumikhinforce-pushed
the
ios-ci-mlx-export
branch
from
September 1, 2026 00:50
8f3a770 to
037b6daCompare
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 freeto 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.
Problem
The mv3 demo app is gaining an MLX option. Its Xcode project will bundle
mv3_mlx.pte, so the iOS CI job that stages models for the demo has to producethat file, or the build fails on a missing resource.
Change
Lower the model to MLX inline, the same way the script already drives the
portable, Core ML and XNNPACK exports (there is no generic
examples/entrypoint that takes a model name and lowers it to MLX). The same export is added to
both iOS scripts.
The check reads the delegates directly off the program and fails unless the model
produced an MLX delegate. The MLX partitioner only logs a warning when it
delegates nothing and still returns a valid program, so without this a model with
no MLX delegate would be staged under an MLX name and the demo would still pass on
the portable kernels. The check runs before the file is written.
Landing order
This change must land first. It produces
mv3_mlx.pte; the demo change consumesit. The scripts clone the demo's default branch, so if the demo landed first its
project would require a model this script does not yet produce and the iOS build
would break.
Test Plan
Ran the lowering and the delegate check against a delegated model: the count is 1
and the file is written; a non-delegated program gives 0 and the check fails
before writing anything. Runtime execution of the staged model is not exercised
here; delegate presence is.