ai-edge-litert: Add version 2.2.0 - #2135
Merged
Merged
Conversation
LiteRT's wheel is the TFLite runtime plus the LiteRT v2 C API, built by bazel from //ci/tools/python/wheel:litert_wheel, mirroring upstream's linux_nightly_wheel.yml and ci/build_pip_package_with_bazel.sh narrowed to riscv64.
luhenry
added a commit
that referenced
this pull request
Sep 20, 2026
Contributor
|
Upstream's .bazelversion pins 7.7.0, but that version cannot be bootstrapped from source on riscv64: its MODULE.bazel bumps apple_support to 1.23.1, which adds a bazel_features dependency, and bazel_features' globals_repo treats the empty native.bazel_version of the scratch bootstrap binary as a dev build newer than everything, so the globals.bzl it generates re-exports bazel 8's macro() and //src:bazel_nojdk fails analysis with "name 'macro' is not defined". bazel 7.5.0's module graph has no bazel_features at all and pins the same rules_python 0.33.2 and rules_java 7.6.5, so the bootstrap recipe is unchanged; it is also what every other bazel port in this repo bootstraps. Nothing gates the version on the LiteRT side: it has no MODULE.bazel, builds with --noenable_bzlmod and no versions.check, and the bootstrapped binary is installed directly rather than through bazelisk, so .bazelversion is never read.
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.
ai-edge-litert2.2.0Bazel builds the TFLite interpreter, the LiteRT v2 C API (
libLiteRt.so) and the pywrap extensions into one per-interpreter wheel. Upstream publishes no riscv64 wheel.Mirrors upstream's
linux_nightly_wheel.ymlandci/build_pip_package_with_bazel.sh.Differs from upstream
.bazelversion7.7.0 - no riscv64 release binary exists for either, and 7.7.0 cannot be bootstrapped at all: it is the first 7.x whoseMODULE.bazelbumpsapple_supportto 1.23.1 and so pulls inbazel_features, whose generatedglobals.bzlre-exports bazel 8'smacro(). LiteRT has noMODULE.bazel, builds with--noenable_bzlmodand noversions.check, and the bootstrapped binary is installed directly rather than through bazelisk, so nothing reads.bazelversionTF_NEED_CLANG=0- the image ships GCC 14, not upstream's clang 18--config=release_cpu_linux- it is-mavx, x86-only--define=xnn_enable_riscv_fp16_vector=false- binutils 2.41 rejectszvfhHERMETIC_REQUIREMENTS_LOCKpins numpy to our index - the TF lock's numpy has no riscv64 wheeldlopened, so the runtime falls back to CPUMatrix: cp311-cp314; cp310 is dropped because ml_dtypes ships no riscv64 wheel for it.
Testing
Interpreterand the LiteRT v2CompiledModel, checked against1/sqrt(768)License: OK
Patches
0001-ci-map-linux-riscv64-to-a-manylinux-wheel-platform-t.patch- Submitted [https://github.com/google-ai-edge/LiteRT]. Without itget_wheel_platform_name()falls through to the literalnone, so the wheel is named...-cp312-cp312-none.whl. Affects any platform upstream has not listed, not just riscv64.