Repository navigation
Adopt LiteRT-LM native v0.19.1-1 and qualify desktop embeddings - #1808
Merged
Merged
Conversation
Linux x64, Linux arm64 and Windows x64 now pass the embedding load gate; Android x86_64 stays refused. litert-lm-native v0.19.1-1 links LiteRT into libLiteRtLm, which fixes desktop embedding engine creation (#1367) and the first-decode GPU crash (#1795). Suite teardown on Windows now leaves the XNNPack caches LiteRT-LM keeps open after dispose instead of failing.
Repin the native hook, every bundle sha256 and the Apple companion SwiftPM manifest to leehack/[email protected] (owner 82d4ae1c, upstream LiteRT-LM 7a03724c). The rebuild links LiteRT into the Linux and Windows libLiteRtLm; its Apple and Android binaries match v0.19.1.
…9.1-1 # Conflicts: # README.md # packages/llamadart_validation/assets/capability_coverage.json
Owner
Author
Real-host GCE requalification: PASS (head
|
| Host | Check | Result |
|---|---|---|
| Linux arm64, c4a-standard-8, Ubuntu 24.04 | litert-lm-multimodal-embedding E2E ×3 (60-item batch cancel by unload and by dispose, 10× repeat bit-identity, text/image/audio/mixed/batch) |
PASS 3/3 |
| probe vectors, 2 load/dispose passes | Passes bit-identical, batch == single. Text, black, checker and silence are bit-exact vs the macOS arm64 control. Tone cos 0.9964, mixed cos 0.9995. All six match the #112 artifact (d1a95f1) bit-for-bit |
|
| Linux x64, c3-standard-8, Ubuntu 24.04 | same E2E ×3 | PASS 3/3 |
| probe vectors | Passes bit-identical, batch == single. vs macOS: text cos 1.000000, images ≥ 0.99862, audio ≥ 0.99558. All six match the #112 artifact bit-for-bit | |
| Windows x64, c3-standard-8, Server 2022 | same E2E ×3 | PASS 3/3. No WER crash events, no dumps |
| probe vectors | Passes bit-identical, batch == single. Same cos as Linux x64 except tone 0.99586 and mixed 0.99838. All six match the #112 artifact bit-for-bit | |
suite teardown (suite_system_temp.dart) |
PR version: tearDownAll passes and leaves only the 4 *.xnnpack_cache files in the suite root. Negative control, the base-branch file on the same host: tearDownAll fails with PathAccessException: Deletion failed … (OS Error: Access is denied, errno = 5) |
|
| Linux x64 + L4, g2-standard-8, driver 580.178.04, Vulkan | Qwen3 GPU ×3, CPU ×2 | PASS. GPU 3/3 rc=0, adapter NVIDIA L4 … backend=Vulkan. GPU outputs identical across runs, CPU outputs identical across runs. GPU equals CPU on 2 of 3 prompts; the 64-token story continuation differs between GPU and CPU kernels |
| Windows x64 + L4, g2-standard-8, driver 596.86, D3D12 | Qwen3 GPU ×3 (debug log), CPU ×2 | PASS. GPU 3/3 rc=0, adapter NVIDIA L4 … backend=Direct3D 12. 0 Dawn validation lines. Outputs identical to Linux GPU and Linux CPU respectively |
| Linux x64 + L4: v0.18.0 (native v0.19.0) baseline | Qwen3 GPU ×3, CPU ×2 | GPU crashes 3/3 (SIGSEGV in __libc_free ← ml_drift::TensorDescriptor::~TensorDescriptor ← TopKWebGpuSampler::SetInferenceFuncAndInputTensors ← InitializeSampler). CPU 2/2 OK |
| Windows x64 + L4: v0.18.0 baseline | same | GPU crashes 3/3 (0xC0000409 at LiteRtLm.dll+0x572fe2, the same offset as the v0.19.1 crash from the #112 lane). CPU 2/2 OK |
Conclusions:
- LiteRT-LM embeddings fail on Linux arm64 and crash on Windows x64 (all v0.18 pins) #1367: desktop embeddings work on all three ABIs, with vectors identical to the owner-PR artifact that was qualified earlier.
- LiteRT-LM desktop GPU crashes on Linux x64 and Windows x64 (v0.19.1) #1795: fixed on both desktop GPU paths. Published 0.18.0 (native v0.19.0) is affected, now runtime-verified on Linux and Windows. This settles the PR body's "not runtime-verified" note.
- No Adopt LiteRT-LM native v0.19.1-1 and qualify desktop embeddings #1808 defect found.
Cleanup: every VM (5), its disk, and the job bucket were deleted. No firewall rule was created; jobs ran through startup-script agents. Evidence is in llamadart-evidence/pr1808-v01911-1/: per-host logs, JSON and comparisons.txt. The Linux L4 host ran in us-west4-c because of zone stockouts elsewhere.
The shared embeddings gate now admits Linux and Windows, but a legacy runtime without litert_lm_get_api_version (v0.18.x) crashes creating a desktop embedding engine (#1367). The legacy client refuses those ABIs with a typed error naming C API 1 / v0.19.1-1; the C API 1 client keeps the widened gate. Desktop creation tests move to the C API 1 fixture. Also: drop the superseded v0.19.1 changelog bullet, note the #1795 GPU crash on v0.19.0, and list suite temp files without following links.
leehack
marked this pull request as ready for review
November 8, 2026 17:56
Contributor
|
Chat app preview removed for |
This was referenced Nov 8, 2026
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
[email protected](owner82d4ae1c, upstream7a03724c) withtool/native/sync_native_release_pins.py: hook tag, all eight bundle sha256s, companionPackage.swiftURLs/checksums, companion README/CHANGELOG, macOS prepare script. The rebuild links LiteRT into the Linux and WindowslibLiteRtLm(litert-lm-native#112); Apple and Android binaries are byte-identical tov0.19.1.liteRtLmNativeEmbeddingsQualifiedForAbi) for C API 1 runtimes; Android x86_64 stays refused. The GPU-embedding refusal no longer names v0.18.1.litert_lm_get_api_version, e.g. a v0.18.xLLAMADART_LITERT_LM_LIB_DIR) keep refusing Linux/Windows embeddings withLlamaUnsupportedExceptionnaming C API 1 / v0.19.1-1, before any native call (liteRtLmEnsureLegacyNativeEmbeddingsQualifiedin the legacy client; the C API 1 client keeps the widened gate). Those runtimes crash on desktop embedding creation (LiteRT-LM embeddings fail on Linux arm64 and crash on Windows x64 (all v0.18 pins) #1367); this closes the audit BLOCK where the widened shared gate let them reach native engine creation.test/support/suite_system_temp.dart) on Windows now leaves the*.xnnpack_cachefiles LiteRT-LM keeps open after dispose, and still fails on any other undeletable file.llamadart-embeddings/llamadart-getting-started/llamadart-speechskills andcapability_coverage.jsonupdated.Fixes #1367
Fixes #1795
Was published 0.18.0 (native v0.19.0) affected by #1795? Yes, runtime-verified (GCE results): v0.18.0 Qwen3 GPU crashed 3/3 on L4 on Linux (SIGSEGV in
TopKWebGpuSamplerteardown) and Windows (0xC0000409, same offset as v0.19.1); CPU was fine. Structurally: the v0.19.0 Linux x64libLiteRtLm.sohasDT_NEEDED libLiteRt.so, its WindowsLiteRtLm.dllimportslibLiteRt.dll, it already contains the source-builtTopKWebGpuSampler(35 exported symbols, same as v0.19.1), and its prebuiltlibLiteRt.soandlibLiteRtWebGpuAccelerator.soare byte-identical to v0.19.1's. That is the exact mixed-runtime configuration that crashes on v0.19.1.Production-readiness scope
LlamaUnsupportedExceptionat load ("they are not qualified there"); native GPU/NPU embeddings and all Web LiteRT-LM embeddings stay refused. A legacy (v0.18.x) custom runtime on Linux/Windows is refused for embeddings before any native call. C API 1.0 custom runtimes older than v0.19.1-1 (v0.19.0, v0.19.1) cannot be told apart from v0.19.1-1 and are documented in known issues.checkLoadnever opens the runtime, so it stays ABI-only and reports the bundled C API 1 runtime as supported; a legacy override fails typed at engine creation.Completeness checklist
validation_coverage_test.dartpasses.PR type guidance
libLiteRtLmbuilt with libstdc++/MSVC STL linked the prebuilt libc++libLiteRtand WebGPU accelerator, so the external-weight handoff (LiteRT-LM embeddings fail on Linux arm64 and crash on Windows x64 (all v0.18 pins) #1367) and the TopK WebGPU sampler tensor teardown (LiteRT-LM desktop GPU crashes on Linux x64 and Windows x64 (v0.19.1) #1795) crossed C++ runtimes. Fixed in the owner build; this PR consumes it and lifts the gate.Test Plan
dart run tool/prepare_workspace.dartdart format --output=none --set-exit-if-changed .dart analyze(no issues)dart run tool/testing/check_platform_boundaries.dartdart test -p vm -j 1 --exclude-tags local-onlyontest/unit/tooling/ test/unit/backends/litert_lm/ test/unit/platform/ test/unit/backends/native/ test/unit/hookplus the fulltest/unitandtest/integration(isolated TMPDIR, macOS arm64): all LiteRT/engine/tooling tests pass; 10 failures are host-environment only and unrelated (windows_registry_qualification_testneedspwsh;model_download_manager_io_concurrency_test/varvs/private/varpath on macOS) — CI is authoritative for these.b09a3259: prepare_workspace, format, analyze (no issues), check_platform_boundaries OK;TMPDIR=$(mktemp -d) dart test -p vm -j 1 --exclude-tags local-only test/unit/backends/litert_lm/ test/unit/core/engine/ test/unit/platform/io/ test/unit/hook test/unit/tooling/: 5292 pass, 50 skipped, 10 fail (after merging main at07cc2eb5: 5301 pass, same 10), all host-environment (6windows_registry_qualification_testneedpwsh; 4model_download_manager_io_concurrency_test, which fails the same way at84198f42without this fix). Mutations: legacy guard removed fails 3/3 legacy refusal tests; legacy guard on the C API 1 client fails 3/3 C API 1 desktop creation tests.python3 -m unittest discover -s tool/native -p 'test_*.py'(188 OK)dart test -p chrome --exclude-tags local-only: N/A locally, CI runs it (no Web change).coverage-lib: N/A locally (inconclusive on macOS after the host-environment failures above);mainenforces the 70% threshold after merge. The lib change only shrinks the gate (net fewer lines).litert-lm-multimodal-embeddingon macOS arm64 against the published v0.19.1-1 bundle: 3/3 pass (control; Apple bytes unchanged).Matrix Evidence
v0.19.1-1->82d4ae1c; Linux x64/arm64libLiteRtLm.sonoDT_NEEDED libLiteRt.so, WindowsLiteRtLm.dllnolibLiteRt.dllimport; Android/Apple binaries identical to v0.19.1 (only xcframeworkInfo.plistslice order differs)e7a8a220…7f4c, CPU07cc2eb5: PASS, 0 blocking findings, 0 PR-caused P1; mutations M1-M4 killed; 8 hook sha256 pins and 7Package.swiftchecksums match the v0.19.1-1 digests; vm suite +5383 ~50 -10, all 10 environmental (6windows_registry_qualification_testneedpwsh; 4model_download_manager_io_concurrency_testfail the same on base4d2078f6)Real-host requalification
GCE requalification on the published v0.19.1-1 bundles (hook-fetched, sha256 matched pins) ran at head
84198f42and passed on all five hosts: Linux arm64/x64 and Windows x64 multimodal-embedding E2E 3/3 each; L4 Linux Vulkan and Windows D3D12 Qwen3 GPU 3/3, CPU 2/2; the v0.18.0 baseline crashes 3/3 on GPU. It still applies to07cc2eb5: the head changes since then are Dart-only guards, tests and docs plus themainmerge, with no native bytes. Windows teardown passes with this PR's.xnnpack_cachehandling and fails (errno = 5) with the base version. Details: results.Review Notes
84198f42returned BLOCK (P2: widened gate reached native embedding creation on legacy v0.18.x desktop runtimes), fixed inb09a3259. The re-audit of exact head07cc2eb5against base4d2078f6(fresh agent session, not the author) returned PASS, zero blocking findings, zero PR-caused P1, and confirms the fix complete.LlamaEngine.dispose(LiteRT-LM worker stopped before native cleanup was confirmed); the job passed on rerun, and no lib change in this head touches the chat or worker path (run 42504531966).High-risk regression review
07cc2eb5(above); 0 unresolved review threadsmainwas merged in; it had made the PR conflict, so no PR CI ran onb09a3259)engine_check_load_io_testassertscheckLoadrefuses Android x86_64 and admits macOS arm64, Linux x64/arm64 and Windows x64; the guard tests assert the exact qualified ABI set and that Android x86_64 / Windows arm64 refuse before any native call on a custom runtime; native creation tests run macOS/iOS/Android arm64 on the legacy fake and Linux arm64/x64 and Windows x64 through runtime selection on the C API 1 fixture; legacy-fake tests assert Linux arm64/x64 and Windows x64 refuse with the C API 1 / v0.19.1-1 message and zero native settings/allocations, both viacreateEmbeddingSessionand through the worker backend. Mutations: swapping the legacy client back to the shared gate fails all 3 legacy refusal tests; giving the C API 1 client the legacy gate fails all 3 C API 1 desktop tests.v0.19.1; its Android arm64 binaries are byte-identical inv0.19.1-1, so it is left as recorded evidence.tool/testing/high_risk_readiness.darton v2 evidence for head07cc2eb5/ base4d2078f6exits 2 (unverifiedPrerequisites: internally consistent; auditor authentication, GitHub App, protected environment and ruleset are not configured, as documented).