Skip to content

Bump urllib3 from 2.2.1 to 2.2.2 in /larq_compute_engine (#808) #2445

Bump urllib3 from 2.2.1 to 2.2.2 in /larq_compute_engine (#808)

Bump urllib3 from 2.2.1 to 2.2.2 in /larq_compute_engine (#808) #2445

Workflow file for this run

name: Tests
on:
push:
branches:
- main
pull_request: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
TF_PYTHON_VERSION: "3.12"
jobs:
TFLite:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci-skip')"
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Run C++ Unit Tests
run: bazelisk test larq_compute_engine/tests:cc_tests --test_output=all
- name: Build TF Lite Static Library with CMake
run: |
mkdir build
cd build
cmake ..
make -j2
ARM:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci-skip')"
steps:
- uses: actions/checkout@v4
- name: Install qemu-user
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends qemu-user
- name: "TF Lite Arm32: Cross-compile and run unit tests in qemu"
run: bazelisk test larq_compute_engine/tests:arm32_tests --config=rpi3 --test_output=all --test_filter="-*BigTest*" --copt=-O1
- name: "TF Lite Aarch64: Cross-compile and run unit tests in qemu"
run: bazelisk test larq_compute_engine/tests:aarch64_tests --config=aarch64 --test_output=all --test_filter="-*BigTest*"
- name: "Benchmark utility: check it builds successfully"
run: bazelisk build //larq_compute_engine/tflite/benchmark:lce_benchmark_model --config=aarch64 --compilation_mode=fastbuild
MLIR:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci-skip')"
steps:
- uses: actions/checkout@v4
- uses: google-github-actions/auth@v2
continue-on-error: true
with:
credentials_json: ${{ secrets.gcs_bazel_cache }}
- name: Configure Bazel
run: |
if [[ -n $GOOGLE_APPLICATION_CREDENTIALS ]]; then
echo -e 'build --remote_cache=https://storage.googleapis.com/plumerai-bazel-cache/lce-ubuntu' >> .bazelrc.user
echo -e 'build --google_default_credentials' >> .bazelrc.user
fi
shell: bash
- name: Run Interpreter test
run: bazelisk test larq_compute_engine/tflite/tests:interpreter_test --test_output=all --test_env=TF_USE_LEGACY_KERAS=1
- name: Run FileCheck tests
run: bazelisk test larq_compute_engine/mlir/tests:all --test_output=all
- name: Run End2End tests
run: bazelisk test larq_compute_engine/tests:end2end_test --test_output=all --test_env=TF_USE_LEGACY_KERAS=1
- name: Run Strip dequantize op tests
run: bazelisk test larq_compute_engine/tests:strip_lcedequantize_test --test_output=all --test_env=TF_USE_LEGACY_KERAS=1
ConverterPython:
runs-on: ubuntu-latest
strategy:
matrix:
tf-version: [2.8.4, 2.9.3, 2.10.1, 2.11.0]
python-version: ["3.10"]
flatbuffers-version: [2.0]
protobuf-version: [3.19.6]
include:
- tf-version: 2.13.0
python-version: 3.11
flatbuffers-version: 23.1.21
protobuf-version: 4.23.4
- tf-version: 2.16.1
python-version: 3.12
flatbuffers-version: 24.3.25
protobuf-version: 4.25.3
if: "!contains(github.event.head_commit.message, 'ci-skip')"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install TensorFlow
run: pip install tensorflow==${{matrix.tf-version}} --no-cache-dir
- name: Install legacy tf-keras
if: matrix.tf-version == '2.16.1'
run: pip install tf-keras==2.16.0
- name: Install flatbuffers
run: pip install flatbuffers==${{matrix.flatbuffers-version}} --no-cache-dir
- name: Install protobuf
run: pip install protobuf==${{matrix.protobuf-version}} --no-cache-dir
- name: Install other dependencies
run: pip install larq~=0.13.3 packaging tqdm --no-cache-dir
- name: Run Converter test
run: TF_USE_LEGACY_KERAS=1 PYTHONPATH=./ python larq_compute_engine/mlir/python/converter_test.py
Android_AAR:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci-skip')"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: 3.12
- uses: actions/cache@v4
id: cache
with:
path: /tmp/lce_android
key: ${{ runner.os }}-${{ hashFiles('**/third_party/install_android.sh') }}
- name: Set Java version
run: echo "JAVA_HOME=${JAVA_HOME_8_X64}" >> $GITHUB_ENV
- name: Download and install Android NDK/SDK
if: steps.cache.outputs.cache-hit != 'true'
run: ./third_party/install_android.sh
- name: Configure Bazel
run: LCE_SET_ANDROID_WORKSPACE=1 ANDROID_SDK_HOME="/tmp/lce_android" ANDROID_API_LEVEL=30 ANDROID_NDK_HOME="/tmp/lce_android/ndk/25.2.9519653" ANDROID_NDK_API_LEVEL=30 ANDROID_BUILD_TOOLS_VERSION=31.0.0 ./configure.py
shell: bash
- name: Build LCE AAR
run: BUILDER=bazelisk ./larq_compute_engine/tflite/java/build_lce_aar.sh