Back to Moonshine

README

core/third-party/onnxruntime/lib/ios/README.md

0.1.11.6 KB
Original Source

These are built from source by scripts/build-ort-ios.sh, not downloaded. They replaced the prebuilt pod archive https://download.onnxruntime.ai/pod-archive-onnxruntime-mobile-c-1.23.2.zip, which is still the thing to compare against if you want to know what the operator-restricted build buys.

Do not drop that pod archive back in here. Everything above the library assumes a minimal build: only ORT-format models load (docs/ort-only-models.md), and there is no CoreML provider (docs/execution-providers.md).

An iOS static library is a poor guide to what an app installs, because the app linker drops the object files nothing references. Both numbers, for the arm64 device slice:

Pod archiveMinimalSaved
libonnxruntime.a36.6 MB18.1 MB18.5 MB
libmoonshine.a (merged)60.3 MB41.8 MB18.5 MB
Linked app binary45.0 MB30.6 MB14.4 MB
__TEXT of that binary31.1 MB22.8 MB8.3 MB

The linked-binary row is the one that matters, and it is what scripts/measure-mobile-size.sh ios reports: it links a small app against the xcframework with -dead_strip and measures the result.

Both Moonshine columns were measured while the diarization models were still compiled in, so they read 8.2 MB high against a library built today (docs/diarization-models.md); the current minimal linked binary is 22.4 MB. The saving each row reports is unaffected, since it is the difference between two builds that both carried those models.

The simulator slice is fat (x86_64 arm64), which ../find-ort-library-path.cmake expects; it is larger than the device slice for that reason alone.