Skip to content

Repin LiteRT-LM to litert-lm-native v0.19.1-5 (#1998) - #2003

Draft
leehack wants to merge 4 commits into
mainfrom
lane-1998-litert-v0191-5
Draft

leehack wants to merge 4 commits into
mainfrom
lane-1998-litert-v0191-5

Conversation

@leehack

@leehack leehack commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Repins LiteRT-LM to litert-lm-native v0.19.1-5 (prerelease promoted from prepare-only run 43521953259). Android arm64/x64 libLiteRtLm.so links the WebGPU top-k sampler again (litert-lm-native#121).
  • Fixes #1998: on the WebGPU/Vulkan route (no loadable OpenCL) a GPU engine loaded and then failed at the first token with "Can not find OpenCL library on this device" (0.18.0 through 0.19.9). Plan: #1995.
  • Pins written by sync_native_release_pins.py --litert-lm-tag v0.19.1-5; hand edits: library smoke admission, tag literals in tests, two SKILL.md, README and website pin text, maintainer sync note, S24 qualifier admission, changelog and known-platform-issues.
  • Release prep, not this PR: llamadart_litert_lm_flutter 0.19.10 with floor llamadart: '>=0.19.10 <0.20.0' (cores up to 0.19.9 treat a -5 companion as a different build). verify_release_docs_versions.dart reports that bump as pending, as expected.

Production-readiness scope

  • User-facing scope: Android LiteRT-LM GPU generation works without a loadable OpenCL library; apps on 0.19.10 get the fixed runtime (Android has no runtime override, so no code guard is needed).
  • Supported platforms/paths: Android arm64 (S24 evidence below), Android x64 (same fix, no device run), all other LiteRT-LM platforms get the new pin with no inventory change.
  • Unsupported or intentionally unavailable paths: Adreno 750's 128 MiB WebGPU binding limit still rejects larger Qwen3 weight buffers; OpenCL stays the recommended route (installation.md unchanged). Older releases cannot be patched: known-platform-issues.md gives them the workaround (declare libOpenCL.so or ComputeDevice.cpu).
  • Out of scope / follow-ups: Pixel (Mali) WebGPU run (W2c) was not run; companion version bump at release prep.

Completeness checklist

  • Declared scope is fully implemented, or explicitly reduced above.
  • Unsupported platform/option combinations fail loudly with actionable diagnostics or are clearly documented as unavailable.
  • Public API docs, README/website docs, examples, support matrices, and changelog entries are updated where relevant.
  • Regression coverage covers the original issue plus key negative/version-skew paths where relevant. The harness test "binding admits only the listed runtime tags, including the pin" fails when the pin moves without S24 admission; v0.19.1-6 is the rejected example. Rolling the pin back to -4 is refused by the sync tool (same-channel rollback).
  • N/A: no public capability change, so no capability_coverage.json change.
  • Security/privacy review completed: no secrets, tokens or signed URLs added.
  • Follow-up work tracked: companion bump in #1995.

PR type guidance

  • Bugfix PR: root cause is the missing WebGPU sampler in the Android libLiteRtLm.so since 0.18.0, fixed in the owner runtime; the regression test is the on-device W1c run below plus the pin-admission harness test. Affected platform: Android (arm64 verified).

Test Plan

  • dart run tool/prepare_workspace.dart
  • dart format --output=none --set-exit-if-changed .
  • dart analyze
  • dart test -p vm -j 1 --exclude-tags local-only (isolated TMPDIR; 14478 passed)
  • dart test -p chrome --exclude-tags local-only (4900 passed)
  • coverage-lib: 93.93% line coverage
  • Other: check_native_release_digests.dart, the four native Python suites, dart test -p vm test/unit/tooling/ and test/unit/hook, packages/llamadart_validation tests and Python suite, companion flutter test, ./tool/docs/build_site.sh, local LiteRT-LM smoke

Matrix Evidence

Matrix row Scope covered Platform / model / backend Result Evidence / notes
static-format-analyze format, analyzer, boundaries macOS, Flutter 3.47.1 PASS check_platform_boundaries.dart clean
root-vm VM unit/integration macOS arm64 PASS 14478 tests
coverage-lib lib/ line coverage macOS arm64 PASS 93.93%
native-release-digests 8 LiteRT-LM archive digests vs the v0.19.1-5 release network PASS
native-sync-python-suites pin policy, header, binding suites Python 3.15 PASS 167 + 14 + 23 + 5 tests
native-hook-bundles hook, bundle selection, companions macOS arm64 PASS test/unit/hook
release-doc-version-consistency install snippets, companion pins n/a PASS companion 0.19.10 reported pending, by design
docs-site website build, links n/a PASS build_site.sh exit 0
litert-lm-engine-smoke LiteRT-LM load and generate macOS arm64, Qwen3 0.6B, cpu PASS RESULT litert_lm_engine; library smoke resolves .dart_tool/llamadart/litert_lm/0.19.1-5 and prints its symbols
validation-harness S24 binding admission and harness macOS arm64 PASS locally, see below package suite 642 tests, Python 47 tests
litert-lm-json-schema Gemma 4 E2B GPU schema checks, Android S24 Test Lab SC-51E / API 36, Adreno 750 PASS (pre-release bytes) W1c-prep (WebGPU route: Adreno 750 adapter selected, 0 OpenCL sampler loads, 5 cases) and C2-prep (OpenCL route, 1 OpenCL sampler load); the prep APKs carry 9926197b, the stripped form of the published archive's libLiteRtLm.so (cc8de93e, archive 09da4ead); the S24 qualifier APK carries cc8de93e unstripped
S24 20-case LiteRT qualifier native/public graph on the new Android bytes Test Lab SC-51E / API 36 PASS matrix 8700956042671373601, 20/20

Qualifier admission

v0.19.1-5 changes the Android libLiteRtLm.so, so S24 admission needed the 20-case LiteRT qualifier again, as #1830 did for v0.19.1-2. Run pr2003-litert0191-5-s24-20261114 (Test Lab matrix 8700956042671373601, source 73b2a2fe): 20/20 PASS, six lifetimes closed, completion present, full LITERT_CL delegation (1306/1306 decode, 1358/1358 prefill), no CPU fallback, same four legacy semantic failures as v0.19.1. Details in doc/litert_lm_v1_adoption.md.

Review Notes

  • Independent review status: pending (high-risk audit of the exact head required before ready)
  • CI status / head SHA: full CI on 5d3b2326, see checks

High-risk regression review

  • Classification: high-risk (surfaces: artifactConsumer, backendRuntime)
  • Implementation task: this lane (worker)
  • Independent blocking QA task: pending
  • Exact head / current base: pending
  • Production-branch deletion, bypass, or miswire proof: pending audit; mutation: reverting the pin to v0.19.1-4 is rejected by the sync tool and the failure W1 recorded returns
  • Affected-family real-model/artifact evidence: W1c-prep and C2-prep on S24 (Gemma 4 E2B GPU); S24 qualifier 20/20; macOS Qwen3 0.6B CPU smoke passed. Pixel (Mali) not run.
  • Explicit unavailable-family or other N/A evidence: Android x64 has no device run
  • Known PR-caused P1 regressions: 0
  • Unresolved review threads: 0

The Android libLiteRtLm.so links the WebGPU top-k sampler again, so GPU
generation works without a loadable OpenCL library.
Name v0.19.1-5 in the Unreleased runtime baseline, correct the owner commit
to bb4e7709, and narrow the libOpenCL.so workaround.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Android LiteRT-LM GPU generation fails without libOpenCL.so declaration (WebGPU sampler missing)

1 participant