Skip to content

Add LiteRT CompiledModel snippets for the litert-runtime skill - #1336

Open
john-rocky wants to merge 4 commits into
android:mainfrom
john-rocky:litert-runtime-skill-snippets-2.4.1
Open

john-rocky wants to merge 4 commits into
android:mainfrom
john-rocky:litert-runtime-skill-snippets-2.4.1

Conversation

@john-rocky

Copy link
Copy Markdown

This is #1186 rebased onto main, with two changes:

I reran the local instrumented test from the 2.3.0 run reported on #1186. All 23 tests passed with LiteRT 2.4.1 on the same Pixel 8a.

smilingday and others added 2 commits November 27, 2026 03:31
Adds LiteRtRuntimeSkillSnippets.kt to the ai module with region-tagged snippets backing the developer.android.com litert-runtime Android agent skill: imports, the Classifier helper (CompiledModel, TensorBuffer reuse, warm-up, close order), on-disk CompiledModel.create(filePath, ...), UiState/MainViewModel with GPU-to-CPU fallback, MainScreen, and preprocess. Adds the LiteRT 2.3.0 litert and litert-gpu dependencies.
No region tags around the import statements and the two LiteRT dependency lines, as suggested in the review of android#1186.
@john-rocky
john-rocky requested a review from a team as a code owner November 26, 2026 19:28
@snippet-bot

snippet-bot Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Here is the summary of changes.

You are about to add 5 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@john-rocky

Copy link
Copy Markdown
Author

@kkuan2011 @ksemenova @JolandaVerhoef, could one of you review this pull request and approve its waiting workflow runs? It takes over #1186.

@smilingday

Copy link
Copy Markdown

Thanks @john-rocky to help follow up this PR. I can revert this PR, once your new change is done.

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.

3 participants