Fix macOS LiteRT-LM runtime packaging#9
Merged
Conversation
1e5a2fe to
609460d
Compare
609460d to
3245fbf
Compare
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.
Summary
Fix macOS LiteRT-LM release packaging so the published x64 runtime no longer leaves Gemma model constraint provider symbols unresolved.
The previous release flow source-built
libLiteRtLm.dylibfor macOS x64. Upstream's Bazel graph selects the macOS arm64 Gemma provider prebuilt for all macOS builds, so the x64 dylib was published with unresolved dynamic lookups forLiteRtLmGemmaModelConstraintProvider_*and no matching x64 provider dylib. Downstream macOS x64 consumers could fail at process startup with a missing_LiteRtLmGemmaModelConstraintProvider_Destroysymbol.This PR adds a macOS packaging path that consumes Google's official
CLiteRTLM_mac.xcframework, builds this repo's bridge-enabledlibLiteRtLm.dylibwrapper, and re-exportslibCLiteRTLM_mac.dylib. It also updates release validation to require the new macOS runtime layout and to fail if the provider symbols are left as unresolved dynamic lookups again.It also separates the Google upstream source tag from the native release tag. That lets us build from upstream
v0.13.1while publishing corrected artifacts as a new immutable native release such asv0.13.1-native.1, instead of overwriting the existingv0.13.1release that downstreamllamadart0.7.x versions checksum-pin.Validation
python3 tools/package_macos_runtime.py --upstream-tag v0.13.1 --archive /tmp/litert-lm-native-check/CLiteRTLM_mac.xcframework.zip --cleanpython3 tools/package_apple_xcframeworks.py --release-tag v0.13.1-native.1 --cleanpython3 tools/validate_runtime_dependencies.pypython3 -m py_compile tools/package_apple_xcframeworks.py tools/package_release.py tools/validate_release_manifest.py tools/package_macos_runtime.py tools/validate_runtime_artifacts.py tools/validate_runtime_dependencies.pygit diff --check--upstream-tag v0.13.1 --release-tag v0.13.1-native.1