[iOS] Split the image processor into its own SwiftPM product instead of bundling it in executorch
Les mainteneurs répondent en général sous 1 jour
@metascroy y travaille déjà.
Depuis le 11/9/2026.
Évaluation
Cette issue n'a pas encore été évaluée.
Description
Problem
The image processor is bundled into the executorch xcframework, so the core runtime
product ends up carrying that helper's Apple framework dependencies.
scripts/build_apple_frameworks.sh merges nine static libraries into a single
executorch.xcframework, and libextension_image.a is one of them. Because it is merged,
a SwiftPM manifest cannot attach anything to that part alone: the smallest thing it can
describe is the whole product. So the frameworks the image processor needs have to be
declared on executorch itself.
That is what #22711 does, and it is the only place the current packaging allows. It reads,
though, as if the ExecuTorch runtime depends on Accelerate and Core Image, which it does
not. Every one of those symbols comes from the image processor:
image_processor_apple.o 8 undefined symbols (vImage, from Accelerate)
image_processor_apple_gpu.o 8 undefined symbols (Core Image)
No other object file in the shipped library references either framework.
There is also a size argument. The image processor is about 93 KB of a 967 KB library, so
roughly 10 percent, and every app that only wants Module and Tensor links it anyway.
Proposal
Give the image processor its own product, the way executorch_llm and executorch_dump
already work. Both build a separate xcframework and layer on the runtime rather than being
merged into it:
"executorch_llm": [
"targets": ["executorch"],
],
An executorch_image product would follow that shape and own its dependencies:
"executorch_image": [
"frameworks": ["Accelerate", "CoreGraphics", "CoreImage", "CoreVideo", "Foundation"],
"targets": ["executorch"],
],
executorch then goes back to declaring only c++, and apps that do not process images
stop linking the helper at all.
What it involves
- Build a separate
executorch_image.xcframeworkinscripts/build_apple_frameworks.sh,
holdinglibextension_image.a. - Add the product above to
Package.swift, and remove the framework block from
executorch. The same change is needed inPackage.swift.templateon theswiftpm
branch, which is what prebuilt users actually get. - Move the bindings,
ExecuTorchImageProcessor.h/.mmand
ExecuTorch+ImageProcessor.swift, out ofextension/appleinto the new product, and
drop#import "ExecuTorchImageProcessor.h"from theExecuTorch.humbrella header.
Step 3 is a breaking change. Today import ExecuTorch gives you the image processor. After
the split it needs a second import, so anyone using it since the bindings landed has to add
a line. Worth calling out in release notes.
Nothing in the runtime depends on extension_image; the only reference is the extension
list in the top-level CMakeLists.txt. So there is no dependency to untangle beyond the
bindings.
Test plan
swift package --disable-sandbox dump-packageshowsexecutorchwith onlyc++, and
executorch_imagewith the five frameworks.- Build a consumer that depends on
executorchalone and does not use the image processor,
and confirm it links with no Apple frameworks declared. - Build a consumer that depends on
executorch_imageand uses the image processor, and
confirm it links and runs on macOS, iOS device and the iOS simulator. - Run the iOS framework and demo app CI.
cc @shoumikhin @larryliu0820 @GregoryComer @cbilgin
- Langage dominant
- Python
- Étoiles
- 5k
- Forks
- 1.2k
- Merge moyen
- 2 j 7 h
- PR mergées (30 j)
- 521
Préparer son environnement
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de pytorch/executorch
-
enhancement triaged
Difficulté 2/5 Une demi-journée Accessibilité débutants 68/100
pytorch/executorch#21640 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 4/5 3-5 jours Accessibilité débutants 55/100
pytorch/executorch#23263 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 4/5 3-5 jours Accessibilité débutants 68/100
pytorch/executorch#23262 ·
Les mainteneurs répondent en général sous 1 jour
-
XNNPACK never delegates slice_copy with stride != 1, but op-support.csv only excludes zero-dim/dynamic shapesPeut-être pris @JakeStevens l’a pris aujourd’hui. Ouvertemodule: xnnpack
pytorch/executorch#23258 · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
[RFC] ExecuTorch Persisting Device Specialized Delegate ArtifactsPeut-être pris @JacobSzwejbka l’a pris il y a 1 jour. Ouverte
pytorch/executorch#23192 · 1 commentaire · 1 réaction · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de pytorch/executorch
Issues similaires
-
customer-reported
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
Azure/azure-cli#34150 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
community-request
Difficulté 1/5 Moins d'une heure Accessibilité débutants 95/100
NVIDIA-NeMo/Curator#2464 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
weblate-discover crashes with an unhandled FileNotFoundError when the directory does not existOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
WeblateOrg/translation-finder#1099 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
trezor/trezor-firmware#7997 ·
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
Les mainteneurs répondent en général sous 1 jour