forked from tensorflow/tflite-micro
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(Make): add test jobs for compression (tensorflow#2988)
Add GitHub CI jobs that run `make test`, etc. with compression enabled. Add as new jobs, as opposed to additional steps within the existing jobs, so they can run in parallel, and so they begin with a fresh, un-built working directory. BUG=part of tensorflow#2636
- Loading branch information
Showing
5 changed files
with
167 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
36 changes: 36 additions & 0 deletions
36
tensorflow/lite/micro/tools/ci_build/test_x86_default_with_compression.sh
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env bash | ||
# Copyright 2024 The TensorFlow Authors. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# ============================================================================== | ||
# | ||
# Called with following arguments: | ||
# 1 - (optional) TENSORFLOW_ROOT: path to root of the TFLM tree (relative to directory from where the script is called). | ||
# 2 - (optional) EXTERNAL_DIR: Path to the external directory that contains external code | ||
|
||
# CI test with compression enabled for x86 | ||
|
||
set -e | ||
set -x | ||
|
||
export TENSORFLOW_ROOT=${1} | ||
export EXTERNAL_DIR=${2} | ||
export USE_TFLM_COMPRESSION=yes | ||
export GENERIC_BENCHMARK_MODEL_PATH=${TENSORFLOW_ROOT}tensorflow/lite/micro/models/person_detect.tflite | ||
MAKEFILE=${TENSORFLOW_ROOT}tensorflow/lite/micro/tools/make/Makefile | ||
|
||
make -f ${MAKEFILE} third_party_downloads # TODO(b/143715361): first to allow parallel builds. | ||
make -f ${MAKEFILE} -j$(nproc) build | ||
make -f ${MAKEFILE} -j$(nproc) test | ||
make -f ${MAKEFILE} -j$(nproc) integration_tests | ||
make -f ${MAKEFILE} -j$(nproc) run_tflm_benchmark |
40 changes: 40 additions & 0 deletions
40
tensorflow/lite/micro/tools/ci_build/test_xtensa_hifi3z_with_compression.sh
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/usr/bin/env bash | ||
# Copyright 2024 The TensorFlow Authors. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# ============================================================================== | ||
# Called with following arguments: | ||
# 1 - EXTERNAL or INTERNAL to signal how to run the script | ||
# 2 - (optional) TENSORFLOW_ROOT: path to root of the TFLM tree (relative to directory from where the script is called). | ||
# 3 - (optional) EXTERNAL_DIR: Path to the external directory that contains external code | ||
|
||
# CI test with compression enabled for hifi3z | ||
|
||
set -e | ||
set -x | ||
pwd | ||
|
||
export TENSORFLOW_ROOT=${2} | ||
export EXTERNAL_DIR=${3} | ||
export TARGET=xtensa | ||
export TARGET_ARCH=hifi3 | ||
export OPTIMIZED_KERNEL_DIR=xtensa | ||
export XTENSA_CORE=HIFI_190304_swupgrade | ||
export GENERIC_BENCHMARK_MODEL_PATH=${TENSORFLOW_ROOT}tensorflow/lite/micro/models/person_detect.tflite | ||
export USE_TFLM_COMPRESSION=yes | ||
MAKEFILE=${TENSORFLOW_ROOT}tensorflow/lite/micro/tools/make/Makefile | ||
|
||
make -f ${MAKEFILE} third_party_downloads # TODO(b/143904317): first to allow parallel builds | ||
make -f ${MAKEFILE} -j$(nproc) build | ||
make -f ${MAKEFILE} -j$(nproc) test | ||
make -f ${MAKEFILE} -j$(nproc) run_tflm_benchmark |
40 changes: 40 additions & 0 deletions
40
tensorflow/lite/micro/tools/ci_build/test_xtensa_hifi5_with_compression.sh
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/usr/bin/env bash | ||
# Copyright 2024 The TensorFlow Authors. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# ============================================================================== | ||
# Called with following arguments: | ||
# 1 - EXTERNAL or INTERNAL to signal how to run the script | ||
# 2 - (optional) TENSORFLOW_ROOT: path to root of the TFLM tree (relative to directory from where the script is called). | ||
# 3 - (optional) EXTERNAL_DIR: Path to the external directory that contains external code | ||
|
||
# CI test with compression enabled for hifi5 | ||
|
||
set -e | ||
set -x | ||
pwd | ||
|
||
export TENSORFLOW_ROOT=${2} | ||
export EXTERNAL_DIR=${3} | ||
export TARGET=xtensa | ||
export TARGET_ARCH=hifi5 | ||
export OPTIMIZED_KERNEL_DIR=xtensa | ||
export XTENSA_CORE=PRD_H5_RDO_07_01_2022 | ||
export GENERIC_BENCHMARK_MODEL_PATH=${TENSORFLOW_ROOT}tensorflow/lite/micro/models/person_detect.tflite | ||
export USE_TFLM_COMPRESSION=yes | ||
MAKEFILE=${TENSORFLOW_ROOT}tensorflow/lite/micro/tools/make/Makefile | ||
|
||
make -f ${MAKEFILE} third_party_downloads # TODO(b/143904317): first to allow parallel builds | ||
make -f ${MAKEFILE} -j$(nproc) build | ||
make -f ${MAKEFILE} -j$(nproc) test | ||
make -f ${MAKEFILE} -j$(nproc) run_tflm_benchmark |