Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check_tflite_files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
echo "${PR_FILES}" >> tmp_pull_request_files.txt
rm -rf .git
echo ${{ secrets.tflm-bot-token }} | docker login ghcr.io -u tflm-bot --password-stdin
docker run --rm -v `pwd`:/tflite-micro -w /tflite-micro ghcr.io/tflm-bot/tflm-ci:0.6.4 python3 ci/check_tflite_files.py tmp_pull_request_files.txt
docker run --rm -v `pwd`:/tflite-micro -w /tflite-micro ghcr.io/tflm-bot/tflm-ci:0.6.5 python3 ci/check_tflite_files.py tmp_pull_request_files.txt
TFLITE_FILE_TEST_STATUS=$?
rm -f tmp_pull_request_files.txt
exit ${TFLITE_FILE_TEST_STATUS}
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ jobs:
with:
ref: ${{ inputs.trigger-sha }}
- name: Test
uses: docker://ghcr.io/tflm-bot/tflm-ci:0.6.4
uses: docker://ghcr.io/tflm-bot/tflm-ci:0.6.5
with:
args: /bin/sh -c tensorflow/lite/micro/tools/ci_build/test_cortex_m_qemu.sh tflite-micro/

Expand All @@ -278,7 +278,7 @@ jobs:
with:
ref: ${{ inputs.trigger-sha }}
- name: Check
uses: docker://ghcr.io/tflm-bot/tflm-ci:0.6.4
uses: docker://ghcr.io/tflm-bot/tflm-ci:0.6.5
with:
args: /bin/sh -c "git config --global --add safe.directory /github/workspace && tensorflow/lite/micro/tools/ci_build/test_code_style.sh"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/riscv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
python-version: '3.10'
- uses: actions/checkout@v3
- name: Test
uses: docker://ghcr.io/tflm-bot/tflm-ci:0.6.4
uses: docker://ghcr.io/tflm-bot/tflm-ci:0.6.5
with:
args: /bin/sh -c tensorflow/lite/micro/tools/ci_build/test_riscv.sh

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/riscv_postmerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ jobs:
with:
ref: ${{ inputs.trigger-sha }}
- name: Test
uses: docker://ghcr.io/tflm-bot/tflm-ci:0.6.4
uses: docker://ghcr.io/tflm-bot/tflm-ci:0.6.5
with:
args: /bin/sh -c tensorflow/lite/micro/tools/ci_build/test_riscv.sh
15 changes: 10 additions & 5 deletions ci/Dockerfile.micro
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#
# --- Build and upload to GHCR.IO ---
# (Run from the root of the TFLM repository)
# export TFLM_CI_VERSION=0.6.4
# docker build -f ci/Dockerfile.micro -t ghcr.io/tflm-bot/tflm-ci:$TFLM_CI_VERSION .
# export TFLM_CI_VERSION=0.6.5
# docker build --no-cache -f ci/Dockerfile.micro -t ghcr.io/tflm-bot/tflm-ci:$TFLM_CI_VERSION .
# docker push ghcr.io/tflm-bot/tflm-ci:$TFLM_CI_VERSION
#
# --- Run locally for debugging ---
Expand All @@ -28,11 +28,17 @@
# Use a prebuilt Python image to speed up the build process.
FROM python:3.10-bookworm

# Install qemu-user from bookworm-backports to address a known bug:
# https://gitlab.com/qemu-project/qemu/-/issues/1697
RUN echo "deb http://deb.debian.org/debian bookworm-backports main" > /etc/apt/sources.list.d/backports.list && \
apt-get update && \
apt-get install -y --no-install-recommends -t bookworm-backports qemu-user && \
rm -rf /var/lib/apt/lists/*

# Install all required system dependencies
RUN apt-get update && apt-get install -y \
gnupg \
lsb-release \
qemu-system-arm \
software-properties-common \
sudo \
wget \
Expand All @@ -56,7 +62,7 @@ RUN wget https://apt.llvm.org/llvm.sh \
# Install all Python dependencies
# - yapf to check for Python formatting
# - Pillow was added first for the C array generation
# - pandas, matplotlib, and six for create_size_log scripts
# - pandas, and matplotlib for create_size_log scripts
# - pyyaml, requests, psutil, and robotframework for Renode test
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir \
Expand All @@ -67,7 +73,6 @@ RUN pip install --no-cache-dir --upgrade pip && \
pyyaml \
requests \
robotframework==4.0.1 \
six \
yapf==0.40.2

# Copy and run install scripts, then clean them up
Expand Down
40 changes: 0 additions & 40 deletions ci/install_qemu.sh

This file was deleted.

3 changes: 1 addition & 2 deletions codegen/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ py_binary(
":graph",
":inference_generator",
"//tensorflow/lite/tools:flatbuffer_utils",
"@absl_py//absl:app",
"@absl_py//absl/flags",
requirement("absl_py"),
],
)
2 changes: 1 addition & 1 deletion python/tflite_micro/signal/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ py_test(
],
deps = [
":overlap_add_op",
"@absl_py//absl/testing:parameterized",
requirement("absl_py"),
requirement("numpy"),
requirement("tensorflow"),
],
Expand Down
5 changes: 2 additions & 3 deletions tensorflow/lite/micro/compression/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,7 @@ py_library(
":model_facade",
":spec",
"//tensorflow/lite/micro/tools:tflite_flatbuffer_align",
"@absl_py//absl:app",
"@absl_py//absl/flags",
requirement("absl_py"),
"@flatbuffers//:runtime_py",
requirement("bitarray"),
requirement("numpy"),
Expand Down Expand Up @@ -246,7 +245,7 @@ py_binary(
deps = [
":metadata_py",
"//tensorflow/lite/python:schema_py",
"@absl_py//absl:app",
requirement("absl_py"),
requirement("bitarray"),
requirement("prettyprinter"),
],
Expand Down
3 changes: 2 additions & 1 deletion tensorflow/lite/micro/compression/view_tests.bzl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
load("@rules_python//python:defs.bzl", "py_test")
load("@tflm_pip_deps//:requirements.bzl", "requirement")

def generate_view_tests(targets):
"""Generates py_test targets for each target's path and a test_suite to
Expand All @@ -20,7 +21,7 @@ def generate_view_tests(targets):
data = [target],
deps = [
":view",
"@absl_py//absl/testing:absltest",
requirement("absl_py"),
],
size = "small",
)
Expand Down
4 changes: 1 addition & 3 deletions tensorflow/lite/micro/examples/hello_world/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ py_binary(
srcs = ["evaluate.py"],
data = ["//tensorflow/lite/micro/examples/hello_world/models:hello_world_float.tflite"],
deps = [
"@absl_py//absl:app",
"@absl_py//absl/flags",
"@absl_py//absl/logging",
requirement("absl_py"),
requirement("numpy"),
requirement("tensorflow"),
"//python/tflite_micro:runtime",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ py_binary(
srcs = ["ptq.py"],
data = ["//tensorflow/lite/micro/examples/hello_world/models:hello_world_float.tflite"],
deps = [
"@absl_py//absl:app",
"@absl_py//absl/flags",
"@absl_py//absl/logging",
requirement("absl_py"),
requirement("numpy"),
requirement("tensorflow"),
"//python/tflite_micro:runtime",
Expand Down
3 changes: 1 addition & 2 deletions tensorflow/lite/micro/examples/micro_speech/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,7 @@ py_binary(
":samples_30ms",
],
deps = [
"@absl_py//absl:app",
"@absl_py//absl/flags",
requirement("absl_py"),
requirement("numpy"),
requirement("tensorflow"),
"//python/tflite_micro:runtime",
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/lite/micro/examples/mnist_lstm/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ py_binary(
srcs = ["evaluate.py"],
deps = [
"//python/tflite_micro:runtime",
"@absl_py//absl:app",
requirement("absl_py"),
requirement("pillow"),
],
)
Expand Down
3 changes: 1 addition & 2 deletions tensorflow/lite/micro/integration_tests/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ py_binary(
],
visibility = ["//:__subpackages__"],
deps = [
"@absl_py//absl:app",
"@absl_py//absl/flags",
requirement("absl_py"),
requirement("mako"),
requirement("tensorflow"),
"//tensorflow/lite/micro/tools:generate_test_for_model",
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/lite/micro/kernels/testdata/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ py_binary(
"lstm_test_data_utils.py",
],
deps = [
"@absl_py//absl:app",
requirement("absl_py"),
requirement("numpy"),
requirement("tensorflow"),
],
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/lite/micro/testing/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ py_binary(
"noubsan", # TODO(b/144512025): Fix raw_to_bitmap_test to fix ubsan failure.
],
deps = [
"@absl_py//absl:app",
requirement("absl_py"),
requirement("numpy"),
requirement("tensorflow"),
],
Expand Down
15 changes: 6 additions & 9 deletions tensorflow/lite/micro/tools/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ py_binary(
deps = [
"//tensorflow/lite/python:schema_py",
"//tensorflow/lite/tools:flatbuffer_utils",
"@absl_py//absl:app",
requirement("absl_py"),
],
)

Expand Down Expand Up @@ -97,7 +97,7 @@ py_binary(
":tflite_flatbuffer_align_wrapper.so",
],
deps = [
"@absl_py//absl:app",
requirement("absl_py"),
],
)

Expand Down Expand Up @@ -130,7 +130,7 @@ py_library(
],
deps = [
":model_transforms_utils",
"@absl_py//absl/logging",
requirement("absl_py"),
requirement("numpy"),
requirement("tensorflow"),
"//python/tflite_micro:runtime",
Expand Down Expand Up @@ -165,9 +165,7 @@ py_binary(
srcs = ["tflm_model_transforms.py"],
deps = [
":tflm_model_transforms_lib",
"@absl_py//absl:app",
"@absl_py//absl/flags",
"@absl_py//absl/logging",
requirement("absl_py"),
],
)

Expand All @@ -185,7 +183,7 @@ py_test(
],
deps = [
":tflm_model_transforms_lib",
"@absl_py//absl/testing:parameterized",
requirement("absl_py"),
requirement("tensorflow"),
"//tensorflow/lite/micro/examples/recipes:resource_variables_lib",
],
Expand All @@ -197,8 +195,7 @@ py_binary(
deps = [
":layer_by_layer_schema_py",
":model_transforms_utils",
"@absl_py//absl:app",
"@absl_py//absl/flags",
requirement("absl_py"),
requirement("tensorflow"),
"//python/tflite_micro:runtime",
"//tensorflow/lite/tools:flatbuffer_utils",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ py_binary(
"templates/micro_mutable_op_resolver.h.mako",
],
deps = [
"@absl_py//absl:app",
"@absl_py//absl/flags",
requirement("absl_py"),
requirement("mako"),
"//tensorflow/lite/python:schema_py",
"//tensorflow/lite/python:schema_util",
Expand All @@ -36,8 +35,7 @@ py_binary(
"templates/micro_mutable_op_resolver_test.cc.mako",
],
deps = [
"@absl_py//absl:app",
"@absl_py//absl/flags",
requirement("absl_py"),
requirement("tensorflow"),
requirement("mako"),
"//tensorflow/lite/micro/tools:generate_test_for_model",
Expand Down
3 changes: 1 addition & 2 deletions tensorflow/lite/tools/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ py_binary(
srcs = ["strip_strings.py"],
deps = [
":flatbuffer_utils",
"@absl_py//absl:app",
"@absl_py//absl/flags",
requirement("absl_py"),
],
)

Expand Down
20 changes: 0 additions & 20 deletions tensorflow/workspace.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -57,26 +57,6 @@ def tf_repositories(path_prefix = "", tf_repo_name = ""):
],
)

tf_http_archive(
name = "absl_py",
sha256 = "516e83df99fe7c365727ef09c9e1f83b55985afaf23dd1ca572b3e160057f5f8",
strip_prefix = "abseil-py-b188d9080c8e5628bb52a93a04ad930abb1717eb",
urls = [
"https://github.com/abseil/abseil-py/archive/b188d9080c8e5628bb52a93a04ad930abb1717eb.zip",
],
)

tf_http_archive(
name = "six_archive",
urls = [
"http://mirror.bazel.build/pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz",
"https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz",
],
sha256 = "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a",
strip_prefix = "six-1.10.0",
build_file = "@//third_party:six.BUILD",
)

initialize_third_party()

def workspace():
Expand Down
9 changes: 5 additions & 4 deletions third_party/python_requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@
# is sensitive to the Python environment (interpreter version, etc.) in which
# it is run.

absl_py
bitarray
tensorflow
twine
numpy
mako
numpy
pillow
yapf
prettyprinter
protobuf
pyyaml
tensorflow
twine
yapf
Loading
Loading