diff --git a/CHANGELOG.md b/CHANGELOG.md index 471dfe6a0..de1772e88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,10 +4,11 @@ Releases before 0.10.0 are in the ## Unreleased - Chat app microphone: a microphone that disconnects mid-recording now transcribes the audio captured so far with a warning, a missing input device on Web is reported as such instead of as a permission denial, and a failed Web start releases the microphone ([#329](https://github.com/leehack/llamadart/issues/329)). +- Fixed Android LiteRT-LM GPU generation failing with "Can not find OpenCL library on this device" when the app does not declare `libOpenCL.so` or the device has no loadable OpenCL: the runtime (`v0.19.1-5`) links the WebGPU sampler again. Affects 0.18.0 through 0.19.9 on Android ([#1998](https://github.com/leehack/llamadart/issues/1998)). - Aligned the default WebGPU bridge assets to `v0.1.85`: a page without cross-origin isolation now fails at once with a `LlamaUnsupportedException` naming COOP/COEP `require-corp` instead of waiting minutes for a generic init timeout, and Firefox CPU runs (`gpuLayers: 0`) no longer create the WebGPU backend (stories15M, 32 tokens: 640 to 762 tok/s against 10 before) ([#1025](https://github.com/leehack/llamadart/issues/1025)). - `ComputeDevice.gpu` on Web now names why WebGPU was not used (for example `adapter_missing_shader_f16`: Chrome on Linux with NVIDIA needs driver 615.71 or newer); documented the measured Safari 27, Firefox 160 and NVIDIA L4 results ([#1025](https://github.com/leehack/llamadart/issues/1025)). -Runtime baseline: native llama.cpp `v0.9.0` and Web use upstream `v0.9.0@cd959bae99ff4bed22bef2604f45241c09bbb8c8`; native LiteRT-LM uses `v0.19.1-4` and stable-diffusion uses `v0.3.0-3`. Web LiteRT-LM uses `@litert-lm/core@0.19.0`. Manifest SHA-256: `6767783edd85e14853a8a79cd6ce53d53f4eb2d99aeb62601014bd68c1b6b7b3`. +Runtime baseline: native llama.cpp `v0.9.0` and Web use upstream `v0.9.0@cd959bae99ff4bed22bef2604f45241c09bbb8c8`; native LiteRT-LM uses `v0.19.1-5` and stable-diffusion uses `v0.3.0-3`. Web LiteRT-LM uses `@litert-lm/core@0.19.0`. Manifest SHA-256: `6767783edd85e14853a8a79cd6ce53d53f4eb2d99aeb62601014bd68c1b6b7b3`. ## 0.19.9 diff --git a/README.md b/README.md index 565deb916..262a66591 100644 --- a/README.md +++ b/README.md @@ -163,7 +163,7 @@ Current default runtime pins: | Runtime | Pin | | --- | --- | | Native llama.cpp / GGUF | `leehack/llamadart-native@v0.9.0` | -| Native LiteRT-LM / `.litertlm` | `leehack/litert-lm-native@v0.19.1-4` | +| Native LiteRT-LM / `.litertlm` | `leehack/litert-lm-native@v0.19.1-5` | | Web llama.cpp / GGUF | `leehack/llama-web-bridge-assets@v0.1.85` | | Web LiteRT-LM / `.litertlm` | `@litert-lm/core@0.19.0` | @@ -171,8 +171,8 @@ Native LiteRT-LM uses a lazy ABI-aware client for direct calls, services and speech. The public selector admits legacy runtimes and C API 1.0.x; unknown or future versions are refused before engine calls. The pinned runtime is published native -[v0.19.1-4](https://github.com/leehack/litert-lm-native/releases/tag/v0.19.1-4), -owner source `5da99205` / upstream `7a03724c`. The selected loader requires +[v0.19.1-5](https://github.com/leehack/litert-lm-native/releases/tag/v0.19.1-5), +owner source `bb4e7709` / upstream `7a03724c`. The selected loader requires macOS 14+ before owned library loads, including legacy libraries and custom paths. Web LiteRT-LM uses `@litert-lm/core@0.19.0`; through `LlamaBackend.withTextHistory()` it forwards chat history, supports tool diff --git a/doc/litert_lm_v1_adoption.md b/doc/litert_lm_v1_adoption.md index 8c9488ac3..84b8a2054 100644 --- a/doc/litert_lm_v1_adoption.md +++ b/doc/litert_lm_v1_adoption.md @@ -80,8 +80,21 @@ LiteRT marker. The APK packaged the archive libraries byte-identically. The results match v0.19.1: 20/20 PASS, six lifetimes closed, completion present, the unchanged decoder accepted journal `a71fb3b3` plus 15 extracted sidecars, full `LITERT_CL` delegation with no CPU fallback, and the same four legacy -semantic failures. The qualifier binding admits `v0.19.1`, `v0.19.1-1` (same -Android binaries) and `v0.19.1-2`. +semantic failures. + +It passed again on v0.19.1-5 (Test Lab matrix `8700956042671373601`, run +`pr2003-litert0191-5-s24-20261114`, source `73b2a2fe`, 2026-11-14). That Android +arm64 bundle (`09da4ead`) differs from v0.19.1-2 only in `libLiteRtLm.so` +(`9a56e701` to `cc8de93e`), which links the WebGPU top-k sampler +([#1998](https://github.com/leehack/llamadart/issues/1998)). The APK packaged +the archive libraries byte-identically (binding `15ea9e6a`). The results match +v0.19.1: 20/20 PASS, six lifetimes closed, completion present, the unchanged +decoder accepted journal `5adffed6` plus 15 extracted sidecars, full +`LITERT_CL` delegation (1306/1306 decode, 1358/1358 prefill) with no CPU +fallback, and the same four legacy semantic failures. The OpenCL route is the +qualified one here; the WebGPU route is covered by the W1c run (Gemma 4 E2B, not +this graph). The qualifier binding admits `v0.19.1`, `v0.19.1-1` (same Android +binaries), `v0.19.1-2` and `v0.19.1-5`. ## Required coverage diff --git a/lib/src/backends/litert_lm/litert_lm_runtime.dart b/lib/src/backends/litert_lm/litert_lm_runtime.dart index 7b98e86d5..2b4830508 100644 --- a/lib/src/backends/litert_lm/litert_lm_runtime.dart +++ b/lib/src/backends/litert_lm/litert_lm_runtime.dart @@ -33,8 +33,8 @@ export 'litert_lm_native_settlement.dart'; part 'litert_lm_embedding_native.dart'; part 'litert_lm_runtime_facade.dart'; -const _litertLmReleaseTag = 'v0.19.1-4'; -const _litertLmVersion = '0.19.1-4'; +const _litertLmReleaseTag = 'v0.19.1-5'; +const _litertLmVersion = '0.19.1-5'; const _litertLmLibDirEnv = 'LLAMADART_LITERT_LM_LIB_DIR'; const _liteRtLmIosNativeAsset = 'package:llamadart/litert_lm_LiteRtLm'; const _processLibraryCandidate = ''; diff --git a/lib/src/hook/native_release_pins.dart b/lib/src/hook/native_release_pins.dart index 9a5c40d26..b50105694 100644 --- a/lib/src/hook/native_release_pins.dart +++ b/lib/src/hook/native_release_pins.dart @@ -106,10 +106,10 @@ const llamaCppBackendSidecarSpecs = [ ]; /// `leehack/litert-lm-native` release tag downloaded for the LiteRT-LM runtime. -const liteRtLmReleaseTag = 'v0.19.1-4'; +const liteRtLmReleaseTag = 'v0.19.1-5'; /// LiteRT-LM cache directory version derived from [liteRtLmReleaseTag]. -const liteRtLmVersion = '0.19.1-4'; +const liteRtLmVersion = '0.19.1-5'; /// A published LiteRT-LM runtime archive and the libraries it must contain. class LiteRtLmBundleSpec { @@ -134,7 +134,7 @@ class LiteRtLmBundleSpec { const liteRtLmBundleSpecs = [ LiteRtLmBundleSpec( 'android-arm64', - sha256: '1a75bcb89152db7659fdf565e45efac01ff3e486ecbd6e86971392a62ffacd6e', + sha256: '09da4ead66bfe95d32aefb890c5b45b10074c60545b99d6c10266d054d93e55f', requiredLibraries: { 'libGemmaModelConstraintProvider.so', 'libLiteRtGpuAccelerator.so', @@ -146,7 +146,7 @@ const liteRtLmBundleSpecs = [ ), LiteRtLmBundleSpec( 'android-x64', - sha256: '093996bc887b1ac86b72b03354c2ff9e77722b55a65b723761aff6f8709939a0', + sha256: 'c29c937ae7eb405dc34188fe1f63003a165146c24389dc51069d2bbe44db4d25', requiredLibraries: { 'libGemmaModelConstraintProvider.so', 'libLiteRtGpuAccelerator.so', @@ -158,17 +158,17 @@ const liteRtLmBundleSpecs = [ ), LiteRtLmBundleSpec( 'ios-arm64', - sha256: '9bac8b318e136cbae374b301c806b5cdf8c59f5cff23ecdba5e2ecb1b61828c7', + sha256: '375201e6b8ccb33f958318dd94aad4629b09a39d7dccbf40584276222d5f0839', requiredLibraries: {'CLiteRTLM', 'LiteRtLm'}, ), LiteRtLmBundleSpec( 'ios-arm64-sim', - sha256: '9597869ec10701016a2d71ec079b6b23736b64431a80036157553299f208fe03', + sha256: 'd0608be33ce98fbc72892941d23eb6fb5ba0799fb9a13acb92ffb8e0200b094c', requiredLibraries: {'CLiteRTLM', 'LiteRtLm'}, ), LiteRtLmBundleSpec( 'macos-arm64', - sha256: '3038c0c1579fbca25fa495cf8d2e372f5206fa7aaeba21d4ffbcd4748d822ae1', + sha256: '54696ced0a18a4f081724cdbf107061ee1d91b09199e2d1cd86d795de24de691', requiredLibraries: { 'libCLiteRTLM_mac.dylib', 'libGemmaModelConstraintProvider.dylib', @@ -178,7 +178,7 @@ const liteRtLmBundleSpecs = [ ), LiteRtLmBundleSpec( 'linux-arm64', - sha256: '0a80b2c6f6460e0ada1c951c4c889fd5eb88dbabec98f707a36e0b99a42aad58', + sha256: '6f6814354a8b1e6e74c91056adc67f345394dd1a0c448f7448c2196cac117a88', requiredLibraries: { 'libGemmaModelConstraintProvider.so', 'libLiteRtLm.so', @@ -188,7 +188,7 @@ const liteRtLmBundleSpecs = [ ), LiteRtLmBundleSpec( 'linux-x64', - sha256: '591cdf6cda81053000b7b67c1e24552551835e534d205316f74d4071127c59c0', + sha256: '5709cc8e944be2370ab91c9054fbe435f19e80a703a6567fdcd9218962daa55a', requiredLibraries: { 'libGemmaModelConstraintProvider.so', 'libLiteRtLm.so', @@ -198,7 +198,7 @@ const liteRtLmBundleSpecs = [ ), LiteRtLmBundleSpec( 'windows-x64', - sha256: '724478c46650f2ce76ce7d46fa6426556a35efbb8a2101c3677525003deadc6a', + sha256: '618b489914283dfe99bac232ba99654bef0b2c26d0a11dc3062016cddb164de5', requiredLibraries: { 'LiteRtLm.dll', 'dxcompiler.dll', diff --git a/packages/llamadart_litert_lm_flutter/CHANGELOG.md b/packages/llamadart_litert_lm_flutter/CHANGELOG.md index e06f9e869..450c877bb 100644 --- a/packages/llamadart_litert_lm_flutter/CHANGELOG.md +++ b/packages/llamadart_litert_lm_flutter/CHANGELOG.md @@ -1,3 +1,7 @@ +## Unreleased + +- Updated Apple SwiftPM native pin to `leehack/litert-lm-native@v0.19.1-5`. + ## 0.19.9 - Refresh README installation guidance for core `0.19.9`. diff --git a/packages/llamadart_litert_lm_flutter/README.md b/packages/llamadart_litert_lm_flutter/README.md index 6a59fd5fd..ef2747f9f 100644 --- a/packages/llamadart_litert_lm_flutter/README.md +++ b/packages/llamadart_litert_lm_flutter/README.md @@ -34,7 +34,7 @@ dependencies: This package has no runtime Dart API of its own. Import `package:llamadart` normally from the core package and use `LlamaBackend()` / `LlamaEngine` there. -The Apple SwiftPM manifest pins `leehack/litert-lm-native@v0.19.1-4`. +The Apple SwiftPM manifest pins `leehack/litert-lm-native@v0.19.1-5`. That runtime loads dedicated ASR `.litertlm` containers such as Whisper tiny. Use the companion that shares the core's `MAJOR.MINOR`: companion `0.19.x` pairs diff --git a/packages/llamadart_litert_lm_flutter/darwin/llamadart_litert_lm_flutter/Package.swift b/packages/llamadart_litert_lm_flutter/darwin/llamadart_litert_lm_flutter/Package.swift index d0b12bc57..49b3b1b3c 100644 --- a/packages/llamadart_litert_lm_flutter/darwin/llamadart_litert_lm_flutter/Package.swift +++ b/packages/llamadart_litert_lm_flutter/darwin/llamadart_litert_lm_flutter/Package.swift @@ -4,7 +4,7 @@ import PackageDescription let packageRoot = URL(fileURLWithPath: #filePath).deletingLastPathComponent() let artifactsRoot = packageRoot.appendingPathComponent("Artifacts") -let liteRtLmTag = "v0.19.1-4" +let liteRtLmTag = "v0.19.1-5" func localArtifactPath(_ name: String) -> String? { let path = artifactsRoot.appendingPathComponent(name).path @@ -47,28 +47,28 @@ let package = Package( repository: "leehack/litert-lm-native", artifactName: "litert-lm-native-apple-LiteRtLm-xcframework-\(liteRtLmTag).zip", tag: liteRtLmTag, - checksum: "7029eb23550f1ab9c92acf125b81365960ced53339440209a153fa5a22d23ccb" + checksum: "ba8850a5eddad1076f9f972d628235fbe6faa76f19d8e80ed41b7b07c9e9fab5" ), nativeRepoBinaryTarget( name: "CLiteRTLM", repository: "leehack/litert-lm-native", artifactName: "litert-lm-native-apple-CLiteRTLM-xcframework-\(liteRtLmTag).zip", tag: liteRtLmTag, - checksum: "9e60ab5122321311612927ba175ef591b7cfa76b9d9230f830b6ae4e6647fd29" + checksum: "a5de01e7eda7f06816be516b897897d8ac4cdd4bfeaf2a82fcf12f945125b9ba" ), nativeRepoBinaryTarget( name: "CLiteRTLMMac", repository: "leehack/litert-lm-native", artifactName: "litert-lm-native-apple-CLiteRTLMMac-xcframework-\(liteRtLmTag).zip", tag: liteRtLmTag, - checksum: "08375201749f4867a6b7e47f301bf7457a471cbc6f54de8ab5911827083eea59" + checksum: "baccbd0a9768880c7b7758a65461f11c7000710db639eeee80c8289d4afa25b8" ), nativeRepoBinaryTarget( name: "WebgpuDawn", repository: "leehack/litert-lm-native", artifactName: "litert-lm-native-apple-WebgpuDawn-xcframework-\(liteRtLmTag).zip", tag: liteRtLmTag, - checksum: "97da822e4038ca4d3f73435de5963ccc51f5e7bb863efb69b174b7049aaf80c3" + checksum: "db96a071efe166c0648f6e469c2365207ca5e7ad43c070c8d1d0ba145c6ea229" ), .target( name: "llamadart_litert_lm_flutter", diff --git a/packages/llamadart_validation/lib/android_litert_qualification.dart b/packages/llamadart_validation/lib/android_litert_qualification.dart index 2981f38c0..71332f708 100644 --- a/packages/llamadart_validation/lib/android_litert_qualification.dart +++ b/packages/llamadart_validation/lib/android_litert_qualification.dart @@ -30,12 +30,15 @@ const s24LiteRtNativeLibraries = { /// and passed the full S24 graph again (Test Lab `matrix-wmalbq6nz437a`, /// #1830). `v0.19.1-3` and `v0.19.1-4` leave Android unchanged: their /// Android arm64 archives hold the same libraries as `v0.19.1-2` (#1798, #1911). +/// `v0.19.1-5` changes the Android `libLiteRtLm.so` again (it links the WebGPU +/// top-k sampler, #1998) and is admitted for its S24 requalification. const s24LiteRtRuntimeTags = { 'v0.19.1', 'v0.19.1-1', 'v0.19.1-2', 'v0.19.1-3', 'v0.19.1-4', + 'v0.19.1-5', }; /// Fixed prospective stage caps sum to 1,050s; FTL still caps the run at 1,200s. diff --git a/packages/llamadart_validation/native/android_litert/README.md b/packages/llamadart_validation/native/android_litert/README.md index bd2f954c6..ca0fda176 100644 --- a/packages/llamadart_validation/native/android_litert/README.md +++ b/packages/llamadart_validation/native/android_litert/README.md @@ -221,8 +221,8 @@ needed for this Dart/diagnostic-only change. Freeze clean source and independent review before preparing an APK. The final binding must contain exact source commit/tree/inventory, runtime tag `v0.19.1`, -`v0.19.1-1`, `v0.19.1-3` or `v0.19.1-4` (same Android binaries) or `v0.19.1-2` -(requalified on S24 in `matrix-wmalbq6nz437a`, see +`v0.19.1-1`, `v0.19.1-3` or `v0.19.1-4` (same Android binaries), or `v0.19.1-2` +or `v0.19.1-5` (requalified on S24; `-2` in `matrix-wmalbq6nz437a`, see [the adoption notes](../../../../doc/litert_lm_v1_adoption.md)) and its owner commit, runtime archive and manifest hashes, complete owner archive libraries, complete installed APK libraries, child executable and canonical Qwen template diff --git a/packages/llamadart_validation/test/android_litert_qualification_test.dart b/packages/llamadart_validation/test/android_litert_qualification_test.dart index d3a972855..ab7784a5e 100644 --- a/packages/llamadart_validation/test/android_litert_qualification_test.dart +++ b/packages/llamadart_validation/test/android_litert_qualification_test.dart @@ -137,7 +137,7 @@ void main() { } for (final tag in [ 'v0.19.0', - 'v0.19.1-5', + 'v0.19.1-6', 'v0.19.2', 'v0.20.0', '0.19.1-1', diff --git a/skills/llamadart-getting-started/SKILL.md b/skills/llamadart-getting-started/SKILL.md index 3971d6b8d..f60433e6d 100644 --- a/skills/llamadart-getting-started/SKILL.md +++ b/skills/llamadart-getting-started/SKILL.md @@ -24,10 +24,10 @@ interface does not establish backend/model support; read `await engine.capabilit ## Guidelines -- Use the pinned native LiteRT-LM v0.19.1-4 runtime. Direct calls, service +- Use the pinned native LiteRT-LM v0.19.1-5 runtime. Direct calls, service probes and speech share ABI-aware discovery. Public selection admits legacy runtimes and C API 1.0.x; unknown/future versions are refused before engine - calls. The pin is published native v0.19.1-4 (owner `5da99205`, upstream + calls. The pin is published native v0.19.1-5 (owner `bb4e7709`, upstream `7a03724c`). The selected loader requires macOS 14+ even for legacy libraries and custom paths. Web uses `@litert-lm/core@0.19.0`. diff --git a/skills/llamadart-speech/SKILL.md b/skills/llamadart-speech/SKILL.md index e397176b3..5a4523d8e 100644 --- a/skills/llamadart-speech/SKILL.md +++ b/skills/llamadart-speech/SKILL.md @@ -15,7 +15,7 @@ description: >- - Native LiteRT-LM speech probes and workers share the text client's ABI-aware discovery. Public selection admits legacy runtimes and C API 1.0.x; the - pinned runtime is published native v0.19.1-4. The selector checks macOS 14+ + pinned runtime is published native v0.19.1-5. The selector checks macOS 14+ before owned loads, including legacy libraries and custom paths. ASR also requires its independent bridge version, layout and complete export group; a text C API version proves none of those capabilities. diff --git a/test/unit/platform/io/runtime_setup_report_io_test.dart b/test/unit/platform/io/runtime_setup_report_io_test.dart index 87e1cc9fb..7f9d3e9f9 100644 --- a/test/unit/platform/io/runtime_setup_report_io_test.dart +++ b/test/unit/platform/io/runtime_setup_report_io_test.dart @@ -57,7 +57,7 @@ void main() { ]); expect(report.runtimes.map((runtime) => runtime.expectedReleaseTag), [ 'v0.9.0', - 'v0.19.1-4', + 'v0.19.1-5', 'v0.3.0-3', ]); expect(report.dartVersion, '3.13.1'); diff --git a/test/unit/tooling/check_webgpu_bridge_tag_test.dart b/test/unit/tooling/check_webgpu_bridge_tag_test.dart index 1d5f25ff4..1d4efd295 100644 --- a/test/unit/tooling/check_webgpu_bridge_tag_test.dart +++ b/test/unit/tooling/check_webgpu_bridge_tag_test.dart @@ -313,7 +313,7 @@ void main() { ); expect( File(nativeLlamaCppTagPath).readAsStringSync(), - contains("const liteRtLmReleaseTag = 'v0.19.1-4';"), + contains("const liteRtLmReleaseTag = 'v0.19.1-5';"), ); }, ); @@ -859,7 +859,7 @@ void main() { const commit = bridgeLlamaCppCommit; String paragraph({ String llama = 'v0.9.0', - String liteRt = 'v0.19.1-4', + String liteRt = 'v0.19.1-5', String sd = 'v0.3.0-3', String upstream = '$bridgeLlamaCppTag@$commit', String liteRtVerb = 'uses', @@ -878,7 +878,7 @@ void main() { files: { nativeLlamaCppTagPath: "const llamaCppTag = 'v0.9.0';\n" - "const liteRtLmReleaseTag = 'v0.19.1-4';\n" + "const liteRtLmReleaseTag = 'v0.19.1-5';\n" "const stableDiffusionReleaseTag = 'v0.3.0-3';\n", 'CHANGELOG.md': '## $heading\n\n- Fix.\n\n$changelog', 'website/docs/changelog/recent-releases.md': @@ -975,7 +975,7 @@ void main() { group('with a released section below Unreleased', () { Directory cycleRepo({ String unreleased = '', - String liteRtPin = 'v0.19.1-5', + String liteRtPin = 'v0.19.1-6', String released = '', }) { final changelog = @@ -995,7 +995,7 @@ void main() { test('a mid-cycle pin bump does not fail the frozen baseline', () { final root = cycleRepo( - unreleased: '- Adopt native LiteRT-LM `v0.19.1-5`.\n', + unreleased: '- Adopt native LiteRT-LM `v0.19.1-6`.\n', released: paragraph(), ); expect(findRuntimeBaselineDrift(root), isEmpty); @@ -1011,11 +1011,11 @@ void main() { unreleased: '- Keep the default WebGPU bridge assets at `v9.9.9`.\n' '\n${paragraph()}', - released: paragraph(liteRt: 'v0.19.1-5'), + released: paragraph(liteRt: 'v0.19.1-6'), ); expect(findRuntimeBaselineDrift(root), [ - allOf(contains('CHANGELOG.md'), contains('v0.19.1-4')), - allOf(contains('recent-releases.md'), contains('v0.19.1-4')), + allOf(contains('CHANGELOG.md'), contains('v0.19.1-5')), + allOf(contains('recent-releases.md'), contains('v0.19.1-5')), ]); }); }); diff --git a/test/unit/tooling/litert_lm_library_smoke_test.dart b/test/unit/tooling/litert_lm_library_smoke_test.dart index 6428de880..c684a81d0 100644 --- a/test/unit/tooling/litert_lm_library_smoke_test.dart +++ b/test/unit/tooling/litert_lm_library_smoke_test.dart @@ -105,6 +105,7 @@ void main() { expect(liteRtLmSmokeUsesCApiV1('v0.19.1-2'), isTrue); expect(liteRtLmSmokeUsesCApiV1('v0.19.1-3'), isTrue); expect(liteRtLmSmokeUsesCApiV1('v0.19.1-4'), isTrue); + expect(liteRtLmSmokeUsesCApiV1('v0.19.1-5'), isTrue); expect(liteRtLmSmokeUsesCApiV1('v0.18.1-4'), isFalse); for (final tag in ['v0.19.0-1', 'v0.19.2', 'v0.20.0', 'g0123456789ab']) { expect( @@ -126,6 +127,7 @@ void main() { ('v0.19.1-2', Abi.windowsX64), ('v0.19.1-3', Abi.macosArm64), ('v0.19.1-4', Abi.macosArm64), + ('v0.19.1-5', Abi.macosArm64), ('v0.18.1-4', Abi.linuxX64), ('v0.18.1-4', Abi.macosArm64), ('v0.18.1-4', Abi.windowsX64), @@ -262,7 +264,7 @@ void main() { runLiteRtLmLibrarySmoke( abi: abi, directory: null, - releaseTag: 'v0.19.1-4', + releaseTag: 'v0.19.1-5', openLibrary: (_) => libraries[fixture]!, ); diff --git a/test/unit/tooling/sync_native_release_pins_script_test.dart b/test/unit/tooling/sync_native_release_pins_script_test.dart index a53e98203..e0fe19424 100644 --- a/test/unit/tooling/sync_native_release_pins_script_test.dart +++ b/test/unit/tooling/sync_native_release_pins_script_test.dart @@ -1602,7 +1602,7 @@ printf '%s\\n' '{"tag_name":"v0.2.0-1","assets":[]}' test('keeps LiteRT release identity separate from cache version', () { final pins = File(_pinsPath).readAsStringSync(); - expect(pins, contains("const liteRtLmReleaseTag = 'v0.19.1-4';")); + expect(pins, contains("const liteRtLmReleaseTag = 'v0.19.1-5';")); final hook = File('hook/build.dart').readAsStringSync(); expect(hook, contains(r"'$liteRtLmReleaseTag'")); expect(hook, isNot(contains(r"v$liteRtLmVersion"))); diff --git a/tool/litert_lm_library_smoke.dart b/tool/litert_lm_library_smoke.dart index df02e414d..5098935ad 100644 --- a/tool/litert_lm_library_smoke.dart +++ b/tool/litert_lm_library_smoke.dart @@ -96,7 +96,8 @@ bool liteRtLmSmokeUsesCApiV1(String releaseTag) { 'v0.19.1-1' || 'v0.19.1-2' || 'v0.19.1-3' || - 'v0.19.1-4' => true, + 'v0.19.1-4' || + 'v0.19.1-5' => true, 'v0.18.1-4' => false, _ => throw UnsupportedError( 'LiteRT-LM library smoke has no reviewed C API inventory for $releaseTag.', diff --git a/tool/macos_litert_lm_prepare_app.sh b/tool/macos_litert_lm_prepare_app.sh index 52058b082..33a0cd356 100755 --- a/tool/macos_litert_lm_prepare_app.sh +++ b/tool/macos_litert_lm_prepare_app.sh @@ -107,8 +107,8 @@ resolve_litert_dir() { fi local candidates=( - "$ROOT_DIR/.dart_tool/llamadart/litert_lm/0.19.1-4/macos_$LITERT_ARCH" - "$ROOT_DIR/.dart_tool/llamadart/litert_lm/0.19.1-4/macos/$LITERT_ARCH" + "$ROOT_DIR/.dart_tool/llamadart/litert_lm/0.19.1-5/macos_$LITERT_ARCH" + "$ROOT_DIR/.dart_tool/llamadart/litert_lm/0.19.1-5/macos/$LITERT_ARCH" ) local candidate for candidate in "${candidates[@]}"; do diff --git a/website/docs/changelog/recent-releases.md b/website/docs/changelog/recent-releases.md index 21a838fb4..0d860c095 100644 --- a/website/docs/changelog/recent-releases.md +++ b/website/docs/changelog/recent-releases.md @@ -14,10 +14,11 @@ validate against the exact release tag notes. ## Unreleased - Chat app microphone: a microphone that disconnects mid-recording now transcribes the audio captured so far with a warning, a missing input device on Web is reported as such instead of as a permission denial, and a failed Web start releases the microphone ([#329](https://github.com/leehack/llamadart/issues/329)). +- Fixed Android LiteRT-LM GPU generation failing with "Can not find OpenCL library on this device" when the app does not declare `libOpenCL.so` or the device has no loadable OpenCL: the runtime (`v0.19.1-5`) links the WebGPU sampler again. Affects 0.18.0 through 0.19.9 on Android ([#1998](https://github.com/leehack/llamadart/issues/1998)). - Aligned default WebGPU bridge assets to `v0.1.85`: a page without cross-origin isolation now fails at once with a `LlamaUnsupportedException` naming COOP/COEP `require-corp` instead of waiting minutes for a generic init timeout, and Firefox CPU runs (`gpuLayers: 0`) no longer create the WebGPU backend (stories15M, 32 tokens: 640 to 762 tok/s against 10 before) ([#1025](https://github.com/leehack/llamadart/issues/1025)). - `ComputeDevice.gpu` on Web now names why WebGPU was not used (for example `adapter_missing_shader_f16`: Chrome on Linux with NVIDIA needs driver 615.71 or newer); documented the measured Safari 27, Firefox 160 and NVIDIA L4 results ([#1025](https://github.com/leehack/llamadart/issues/1025)). -Runtime baseline: native llama.cpp `v0.9.0` and Web use upstream `v0.9.0@cd959bae99ff4bed22bef2604f45241c09bbb8c8`; native LiteRT-LM uses `v0.19.1-4` and stable-diffusion uses `v0.3.0-3`. Web LiteRT-LM uses `@litert-lm/core@0.19.0`. Manifest SHA-256: `6767783edd85e14853a8a79cd6ce53d53f4eb2d99aeb62601014bd68c1b6b7b3`. +Runtime baseline: native llama.cpp `v0.9.0` and Web use upstream `v0.9.0@cd959bae99ff4bed22bef2604f45241c09bbb8c8`; native LiteRT-LM uses `v0.19.1-5` and stable-diffusion uses `v0.3.0-3`. Web LiteRT-LM uses `@litert-lm/core@0.19.0`. Manifest SHA-256: `6767783edd85e14853a8a79cd6ce53d53f4eb2d99aeb62601014bd68c1b6b7b3`. ## 0.19.9 diff --git a/website/docs/maintainers/native-and-web-sync.md b/website/docs/maintainers/native-and-web-sync.md index 2c532dcbf..98660ee5c 100644 --- a/website/docs/maintainers/native-and-web-sync.md +++ b/website/docs/maintainers/native-and-web-sync.md @@ -419,15 +419,19 @@ parameters. The public lazy facade, service metadata/finish probes and speech worker share discovery and ABI selection. `_liteRtLmV1ProductionSelection` in `litert_lm_runtime_facade.dart` enables public C API 1.0.x dispatch. The native hook and Apple companion source now pin published -[v0.19.1-4](https://github.com/leehack/litert-lm-native/releases/tag/v0.19.1-4), -owner `5da99205` / upstream `7a03724c`, which keeps C API 1.0.0 and the +[v0.19.1-5](https://github.com/leehack/litert-lm-native/releases/tag/v0.19.1-5), +owner `bb4e7709` / upstream `7a03724c`, which keeps C API 1.0.0 and the `v0.19.0` exports and adds the in-process LiteRT marker `litert_lm_native_in_process_litert_abi_version` (1 on every platform); the `LiteRT-LM Smoke` library step fails when the bundled Linux x64 or Windows x64 runtime lacks the export or does not report 1, and prints the value as `inProcessLiteRtAbi`; Linux arm64 has no CI runner for it. Rolling the pin back to a pre-marker tag (`v0.18.1-4`, `v0.19.0`, `v0.19.1`, `v0.19.1-1`) therefore -fails the smoke on Linux and Windows by design. The +fails the smoke on Linux and Windows by design. `v0.19.1-5` links the +WebGPU top-k sampler into the Android `libLiteRtLm.so` again +([#1998](https://github.com/leehack/llamadart/issues/1998)), so Android +GPU runs on the WebGPU route work without OpenCL; rolling back to `-4` brings +the failure back. The earlier `-1` rebuild links LiteRT into the Linux and Windows `libLiteRtLm` ([litert-lm-native#112](https://github.com/leehack/litert-lm-native/pull/112)); its Apple and Android binaries are identical to `v0.19.1`. Upstream @@ -467,7 +471,7 @@ blocks unload and dispose. On Linux ext4, releasing a freshly written CPU XNNPACK weight cache flushes it to disk, about 4 s for Qwen3 0.6B's 600 MB cache on CI disks ([#1814](https://github.com/leehack/llamadart/issues/1814)). -Public ABI-aware selection and the v0.19.1-4 source pin are enabled; remaining +Public ABI-aware selection and the v0.19.1-5 source pin are enabled; remaining consumer, feature and platform gates are recorded in `doc/litert_lm_v1_adoption.md`. This transport contract alone does not qualify a model or device. The owner proxy's diff --git a/website/docs/platforms/known-platform-issues.md b/website/docs/platforms/known-platform-issues.md index 864db730f..086582c47 100644 --- a/website/docs/platforms/known-platform-issues.md +++ b/website/docs/platforms/known-platform-issues.md @@ -110,7 +110,13 @@ feature. For which runtime supports which feature, see the - Android LiteRT-LM needs the app's optional vendor OpenCL manifest request when targeting API 31+ on Android 12+; see [Android setup](../getting-started/installation#android-litert-lm-setup). - Without accessible OpenCL, the runtime can try WebGPU. On Adreno 750 + Without accessible OpenCL, the runtime can try WebGPU. In 0.18.0 through + 0.19.9 it creates the GPU engine and then fails the first generation with + "Can not find OpenCL library on this device" because the Android runtime + lacks the WebGPU sampler; 0.19.10 fixes this + ([#1998](https://github.com/leehack/llamadart/issues/1998)). On those + versions, declare `libOpenCL.so` (this helps only on devices with a + loadable OpenCL) or use `ComputeDevice.cpu`. On Adreno 750 (Galaxy S24), WebGPU's 128 MiB storage-buffer binding limit rejects a larger Qwen3 weight buffer. `ComputeDevice.gpu` fails on GPU creation; `auto` retries on the CPU with a warning diff --git a/website/docs/platforms/native-build-hooks.md b/website/docs/platforms/native-build-hooks.md index 3d8c8dd8f..d60e3c535 100644 --- a/website/docs/platforms/native-build-hooks.md +++ b/website/docs/platforms/native-build-hooks.md @@ -101,7 +101,7 @@ hooks: ABI checks and requires macOS 14+ before loading even an explicit path or legacy library; public selection admits C API 1.0.x while unknown/future versions remain unsupported. The hook and Apple companion pin published - native `v0.19.1-4`. + native `v0.19.1-5`. - An empty or all-unknown selection falls back to `llama_cpp` and `litert_lm`; one that leaves no runtime, such as `none`, fails the build. diff --git a/website/docs/platforms/support-matrix.md b/website/docs/platforms/support-matrix.md index 3931a6f03..a545533a2 100644 --- a/website/docs/platforms/support-matrix.md +++ b/website/docs/platforms/support-matrix.md @@ -218,20 +218,20 @@ web are on [Known platform issues](./known-platform-issues). | Runtime | Pinned release | | --- | --- | | llama.cpp native | `leehack/llamadart-native@v0.9.0` | -| LiteRT-LM native | `leehack/litert-lm-native@v0.19.1-4` | +| LiteRT-LM native | `leehack/litert-lm-native@v0.19.1-5` | | stable-diffusion.cpp native (opt-in, Preview) | `leehack/stable-diffusion-native@v0.3.0-3`, for [image generation](../guides/image-generation); see [Opt-in stable_diffusion runtime](./native-build-hooks#opt-in-stable_diffusion-runtime-experimental). Flutter iOS/macOS apps link its XCFramework through `llamadart_stable_diffusion_flutter` | | WebGPU bridge assets | `leehack/llama-web-bridge-assets`; see [Pinned bridge assets](./webgpu-bridge#pinned-bridge-assets) | The native-assets hook currently pins `llamadart-native` tag `v0.9.0` and -`litert-lm-native` release `v0.19.1-4` (`lib/src/hook/native_release_pins.dart`). +`litert-lm-native` release `v0.19.1-5` (`lib/src/hook/native_release_pins.dart`). The direct native client, service probes and speech worker share ABI-aware discovery. Public selection admits legacy runtimes and C API 1.0.x; unknown or future versions are refused before engine calls. The pinned runtime is published native -[v0.19.1-4](https://github.com/leehack/litert-lm-native/releases/tag/v0.19.1-4) -(owner `5da99205`, upstream `7a03724c`). The selected loader requires macOS 14+ +[v0.19.1-5](https://github.com/leehack/litert-lm-native/releases/tag/v0.19.1-5) +(owner `bb4e7709`, upstream `7a03724c`). The selected loader requires macOS 14+ before loading any core or companion library, including legacy libraries and custom paths. Web uses `@litert-lm/core@0.19.0`. The Flutter companion's iOS 16.4 floor remains separate.