Skip to content

Commit fe6427a

Browse files
committed
Update (base update)
[ghstack-poisoned]
2 parents adc088c + 5e8d11b commit fe6427a

1,751 files changed

Lines changed: 232633 additions & 32239 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.ci/scripts/download_hf_hub.sh‎

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ export HF_HUB_DISABLE_XET=1
77
# Arguments:
88
# 1. model_id: The Hugging Face repository ID (e.g., "organization/model_name")
99
# 2. subdir: The optional subdirectory in the repo to look for files (pass "" if not used)
10-
# 3. file_names: A space-separated list of filenames to be downloaded
10+
# 3. revision: The commit hash to download
11+
# 4. file_names: A space-separated list of filenames to be downloaded
1112
# Returns:
1213
# The directory containing the downloaded files
1314
function download_hf_files() {
1415
local model_id="$1"
1516
local subdir="$2"
16-
shift 2
17+
local revision="$3"
18+
shift 3
1719
local file_names=("$@") # Capture all remaining arguments as an array
1820

1921
local download_dir
@@ -24,7 +26,8 @@ from huggingface_hub import hf_hub_download
2426
# Download the first file and get its directory
2527
path = hf_hub_download(
2628
repo_id='${model_id}',
27-
filename='${subdir:+${subdir}/}${file_names[0]}'
29+
filename='${subdir:+${subdir}/}${file_names[0]}',
30+
revision='${revision}'
2831
)
2932
import os
3033
print(os.path.dirname(path))")
@@ -41,7 +44,8 @@ from huggingface_hub import hf_hub_download
4144
# Download the file
4245
hf_hub_download(
4346
repo_id='${model_id}',
44-
filename='${subdir:+${subdir}/}${file_name}'
47+
filename='${subdir:+${subdir}/}${file_name}',
48+
revision='${revision}'
4549
)"
4650

4751
if [ $? -ne 0 ]; then
@@ -67,6 +71,10 @@ if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
6771
SUBDIR="$2"
6872
shift 2
6973
;;
74+
--revision)
75+
REVISION="$2"
76+
shift 2
77+
;;
7078
--files)
7179
shift
7280
FILES_TO_DOWNLOAD=()
@@ -83,13 +91,13 @@ if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
8391
done
8492

8593
# Validate required arguments
86-
if [ -z "$MODEL_ID" ] || [ ${#FILES_TO_DOWNLOAD[@]} -eq 0 ]; then
87-
echo "Usage: $0 --model_id <model_id> --subdir <subdir> --files <file1> [<file2> ...]" >&2
94+
if [ -z "$MODEL_ID" ] || [ -z "$REVISION" ] || [ ${#FILES_TO_DOWNLOAD[@]} -eq 0 ]; then
95+
echo "Usage: $0 --model_id <model_id> --revision <commit> --subdir <subdir> --files <file1> [<file2> ...]" >&2
8896
exit 1
8997
fi
9098

9199
# Call the function
92-
DOWNLOAD_DIR=$(download_hf_files "$MODEL_ID" "$SUBDIR" "${FILES_TO_DOWNLOAD[@]}")
100+
DOWNLOAD_DIR=$(download_hf_files "$MODEL_ID" "$SUBDIR" "$REVISION" "${FILES_TO_DOWNLOAD[@]}")
93101
if [ $? -eq 0 ]; then
94102
echo "$DOWNLOAD_DIR"
95103
else

‎.ci/scripts/setup-openvino.sh‎

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,27 @@ for arg in "$@"; do
1818
esac
1919
done
2020

21-
# Download and install OpenVINO from release packages
22-
OPENVINO_VERSION="2026.0"
23-
OPENVINO_BUILD="2026.0.0.20965.c6d6a13a886"
24-
OPENVINO_STABLE_URL="https://storage.openvinotoolkit.org/repositories/openvino/packages/${OPENVINO_VERSION}/linux/openvino_toolkit_ubuntu22_${OPENVINO_BUILD}_x86_64.tgz"
25-
26-
OPENVINO_NIGHTLY_BUILD_ID="2026.1.0-21310-c694fbc2b6d"
27-
OPENVINO_NIGHTLY_BUILD="2026.1.0.dev20260312"
28-
OPENVINO_NIGHTLY_URL="https://storage.openvinotoolkit.org/repositories/openvino/packages/nightly/${OPENVINO_NIGHTLY_BUILD_ID}/openvino_toolkit_ubuntu22_${OPENVINO_NIGHTLY_BUILD}_x86_64.tgz"
29-
21+
OPENVINO_PACKAGES_URL="https://storage.openvinotoolkit.org/repositories/openvino/packages"
3022
if [ "${USE_NIGHTLY}" = true ]; then
31-
OPENVINO_URL="${OPENVINO_NIGHTLY_URL}"
32-
OPENVINO_EXTRACTED_DIR="openvino_toolkit_ubuntu22_${OPENVINO_NIGHTLY_BUILD}_x86_64"
33-
echo "Using OpenVINO nightly build: ${OPENVINO_NIGHTLY_BUILD_ID}"
23+
# Only for quick testing. OpenVINO deletes nightlies after a few months, so
24+
# take the newest one instead of pinning a build that will disappear.
25+
OPENVINO_URL=$(curl -fsSL --retry 3 --retry-all-errors "${OPENVINO_PACKAGES_URL}/nightly/latest.txt" | sed -n 's/^ubuntu22_x86_64://p')
26+
: "${OPENVINO_URL:?could not get the ubuntu22_x86_64 nightly from latest.txt}"
27+
OPENVINO_SHA256=$(curl -fsSL --retry 3 --retry-all-errors "${OPENVINO_URL}.sha256" | sed -nE 's/^([0-9a-f]{64}).*/\1/p')
28+
: "${OPENVINO_SHA256:?could not get the SHA-256 of the nightly from its .sha256 file}"
3429
else
35-
OPENVINO_URL="${OPENVINO_STABLE_URL}"
36-
OPENVINO_EXTRACTED_DIR="openvino_toolkit_ubuntu22_${OPENVINO_BUILD}_x86_64"
37-
echo "Using OpenVINO stable release: ${OPENVINO_BUILD}"
30+
OPENVINO_VERSION="2026.4.1"
31+
OPENVINO_BUILD="2026.4.1.22982.07f9c262b05"
32+
OPENVINO_SHA256="e2541afe65a81d5aabe981f9a86ad2c7efe557922b71e5649b6aafffec7c982b"
33+
OPENVINO_URL="${OPENVINO_PACKAGES_URL}/${OPENVINO_VERSION}/linux/openvino_toolkit_ubuntu22_${OPENVINO_BUILD}_x86_64.tgz"
3834
fi
35+
OPENVINO_EXTRACTED_DIR=$(basename "${OPENVINO_URL}" .tgz)
36+
echo "Using OpenVINO: ${OPENVINO_EXTRACTED_DIR}"
3937

40-
curl -Lo /tmp/openvino_toolkit.tgz --retry 3 --retry-all-errors --fail ${OPENVINO_URL}
38+
curl -Lo /tmp/openvino_toolkit.tgz --retry 3 --retry-all-errors --fail "${OPENVINO_URL}"
39+
# The storage server answers a missing file with an HTML page and HTTP 200, so
40+
# compare the download with the expected hash before extracting it.
41+
echo "${OPENVINO_SHA256} /tmp/openvino_toolkit.tgz" | sha256sum -c -
4142
tar -xzf /tmp/openvino_toolkit.tgz
4243
mv "${OPENVINO_EXTRACTED_DIR}" openvino
4344

‎.ci/scripts/setup-qnn-deps.sh‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ set -ex
99

1010
source "$(dirname "${BASH_SOURCE[0]}")/../../backends/qualcomm/scripts/install_qnn_sdk.sh"
1111

12-
setup_libcpp 12
1312
setup_android_ndk
1413
install_qnn
1514
pip install -r backends/qualcomm/requirements.txt

‎.ci/scripts/test-native.sh‎

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
#!/usr/bin/env bash
2+
# Copyright (c) Meta Platforms, Inc. and affiliates.
3+
# All rights reserved.
4+
#
5+
# This source code is licensed under the BSD-style license found in the
6+
# LICENSE file in the root directory of this source tree.
7+
8+
set -euxo pipefail
9+
10+
component="${1:?Usage: test-native.sh <runtime|cpu|ggml|vulkan> [cmake options]}"
11+
shift
12+
build_dir="cmake-out/native-${component}"
13+
build_jobs="${CMAKE_BUILD_PARALLEL_LEVEL:-$(nproc)}"
14+
cmake_args=()
15+
targets=()
16+
17+
case "${component}" in
18+
runtime)
19+
targets+=(native_runtime_test)
20+
test_regex='^native_runtime_test$'
21+
;;
22+
cpu)
23+
cmake_args+=(
24+
-DEXECUTORCH_BUILD_NATIVE_CPU=ON
25+
-DEXECUTORCH_BUILD_XNNPACK=ON
26+
-DEXECUTORCH_BUILD_KERNELS_OPTIMIZED=ON
27+
-DEXECUTORCH_BUILD_NATIVE_VISION_RUNNER=ON
28+
)
29+
targets+=(native_cpu_engine_test run_classification_cpu)
30+
test_regex='^native_cpu_engine_test$'
31+
;;
32+
ggml)
33+
cmake_args+=(
34+
-DEXECUTORCH_BUILD_NATIVE_GGML=ON
35+
-DEXECUTORCH_BUILD_NATIVE_LLM_RUNNER=ON
36+
-DEXECUTORCH_BUILD_NATIVE_VISION_RUNNER=ON
37+
-DGGML_NATIVE=OFF
38+
)
39+
targets+=(run_hf_llm_ggml native_ggml_engine_test native_llm_runner_utils_test run_classification_ggml_cpu)
40+
test_regex='^native_(ggml_engine|llm_runner_utils)_test$'
41+
;;
42+
vulkan)
43+
cmake_args+=(
44+
-DEXECUTORCH_BUILD_NATIVE_VULKAN=ON
45+
-DEXECUTORCH_BUILD_NATIVE_VISION_RUNNER=ON
46+
-DEXECUTORCH_BUILD_NATIVE_LLM_RUNNER=ON
47+
-DEXECUTORCH_VULKAN_SHADER_COMPILE_NTHREADS="${build_jobs}"
48+
)
49+
targets+=(native_vulkan_engine run_classification run_hf_llm_vulkan native_vulkan_passes_test native_runner_utils_test)
50+
test_regex='^native_(vulkan_passes|runner_utils)_test$'
51+
;;
52+
*)
53+
echo "Unknown native component: ${component}" >&2
54+
exit 1
55+
;;
56+
esac
57+
58+
cmake -S . -B "${build_dir}" -G Ninja \
59+
-DCMAKE_BUILD_TYPE=Release \
60+
-DPYTHON_EXECUTABLE="$(command -v python)" \
61+
-DEXECUTORCH_BUILD_TESTS=ON \
62+
-DEXECUTORCH_BUILD_EXTENSION_DATA_LOADER=ON \
63+
-DEXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR=ON \
64+
-DEXECUTORCH_BUILD_EXECUTOR_RUNNER=OFF \
65+
-DEXECUTORCH_BUILD_NATIVE=ON \
66+
"${cmake_args[@]}" "$@"
67+
cmake --build "${build_dir}" \
68+
--parallel "${build_jobs}" \
69+
--target "${targets[@]}"
70+
ctest --test-dir "${build_dir}/backends/native/test" \
71+
-R "${test_regex}" --output-on-failure --no-tests=error --timeout 120
72+
73+
if [[ "${component}" == "ggml" ]]; then
74+
PYTHONPATH="${PWD}/src:${PYTHONPATH:-}" \
75+
FLATC_EXECUTABLE="${FLATC_EXECUTABLE:-${PWD}/${build_dir}/third-party/flatc_ep/bin/flatc}" \
76+
python .ci/scripts/test_native_llm_runner.py \
77+
--runner "${build_dir}/backends/native/examples/hf_llm/runtime/run_hf_llm_ggml"
78+
fi

‎.ci/scripts/test_backend.sh‎

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ if [[ "$FLOW" == *qnn* ]]; then
5353
EXTRA_BUILD_ARGS+=" -DEXECUTORCH_BUILD_QNN=ON -DQNN_SDK_ROOT=$QNN_SDK_ROOT -DEXECUTORCH_BUILD_EXTENSION_TENSOR=ON"
5454
fi
5555

56+
if [[ "$FLOW" == *cpu* ]]; then
57+
EXTRA_BUILD_ARGS+=" -DEXECUTORCH_BUILD_CPU=ON -DEXECUTORCH_BUILD_XNNPACK=ON -DEXECUTORCH_BUILD_KERNELS_OPTIMIZED=ON"
58+
fi
59+
5660
if [[ "$FLOW" == *vulkan* ]]; then
5761
# CPU runners can have Mesa ICDs installed without a usable hardware GPU.
5862
source .ci/scripts/setup-vulkan-linux-deps.sh "swiftshader"
@@ -72,11 +76,13 @@ if [[ "$FLOW" == *arm* ]]; then
7276
PYTEST_RETRY_ARGS=(--reruns 2 --reruns-delay 1)
7377
fi
7478

75-
# Setup ARM deps.
79+
# Setup ARM deps. Only the Ethos-U flows run on an FVP.
7680
if [[ "$FLOW" == *vgf* ]]; then
77-
.ci/scripts/setup-arm-baremetal-tools.sh --enable-mlsdk-deps --install-mlsdk-deps-with-pip
78-
else
81+
.ci/scripts/setup-arm-baremetal-tools.sh --disable-ethos-u-deps --enable-mlsdk-deps --install-mlsdk-deps-with-pip
82+
elif [[ "$FLOW" == *ethos_u* ]]; then
7983
.ci/scripts/setup-arm-baremetal-tools.sh
84+
else
85+
.ci/scripts/setup-arm-baremetal-tools.sh --disable-ethos-u-deps
8086
fi
8187
source examples/arm/arm-scratch/setup_path.sh
8288

@@ -94,7 +100,7 @@ fi
94100
if [[ "$FLOW" == *cortex_m* ]]; then
95101
# Cortex-M runs on the Corstone-300 FVP, using the same Arm toolchain as the
96102
# Ethos-U flows but its own semihosting runner.
97-
.ci/scripts/setup-arm-baremetal-tools.sh
103+
.ci/scripts/setup-arm-baremetal-tools.sh --fvp corstone300
98104
source examples/arm/arm-scratch/setup_path.sh
99105

100106
backends/cortex_m/test/build_test_runner.sh
@@ -119,7 +125,7 @@ fi
119125

120126
if [[ "$FLOW" == *openvino* ]]; then
121127
# Setup OpenVINO environment
122-
source .ci/scripts/setup-openvino.sh --nightly
128+
source .ci/scripts/setup-openvino.sh
123129
EXTRA_BUILD_ARGS+=" -DEXECUTORCH_BUILD_OPENVINO=ON"
124130
fi
125131

‎.ci/scripts/test_cuda_runtime_windows.ps1‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ $tests = @(
3333
"test_cuda_allocator",
3434
"test_cuda_mutable_state",
3535
"test_cuda_weight_cache",
36+
"test_cuda_output_copy",
3637
"test_cuda_sort_rand",
3738
"test_cuda_guard",
3839
"test_cuda_stream_guard"

‎.ci/scripts/test_espressif.sh‎

Lines changed: 101 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,45 @@ set -euo pipefail
99

1010
et_root=$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)
1111
build_dir="${ESPRESSIF_BUILD_DIR:-${et_root}/cmake-out-esp-emulator}"
12+
espnn_kernels="${ESPRESSIF_NN_KERNELS:-optimized}"
13+
case "${espnn_kernels}" in
14+
optimized) espnn_config=CONFIG_NN_OPTIMIZED ;;
15+
ansi) espnn_config=CONFIG_NN_ANSI_C ;;
16+
*) echo "ESPRESSIF_NN_KERNELS must be optimized or ansi" >&2; exit 1 ;;
17+
esac
1218
export ESPRESSIF_TOOLS_DIR="${ESPRESSIF_TOOLS_DIR:-${RUNNER_TEMP:-/tmp}/executorch-espressif}"
1319
mkdir -p "${build_dir}"
1420
build_dir=$(cd "${build_dir}" && pwd)
1521
cd "${et_root}"
1622

1723
collect_artifacts() {
24+
local file operator_dir artifact_dir
1825
if [[ -n "${RUNNER_ARTIFACT_DIR:-}" ]]; then
1926
mkdir -p "${RUNNER_ARTIFACT_DIR}/esp32s3"
2027
for file in "${build_dir}"/*.log "${build_dir}"/*.bpte \
28+
"${build_dir}"/espnn-*-sdkconfig \
29+
"${build_dir}/espnn-tests"/*.bpte \
30+
"${build_dir}/espnn-tests/manifest.json" \
31+
"${build_dir}/espnn-tests/operators.txt" \
32+
"${et_root}/examples/espressif/project/dependencies.lock" \
2133
"${build_dir}/firmware/merged-binary.bin" \
2234
"${build_dir}/firmware/executorch_esp_runner.elf"; do
2335
if [[ -f "${file}" ]]; then
2436
cp "${file}" "${RUNNER_ARTIFACT_DIR}/esp32s3/"
2537
fi
2638
done
39+
for operator_dir in "${build_dir}"/operator-library-*; do
40+
[[ -d "${operator_dir}" ]] || continue
41+
artifact_dir="${RUNNER_ARTIFACT_DIR}/esp32s3/${operator_dir##*/}"
42+
mkdir -p "${artifact_dir}"
43+
for file in "${operator_dir}"/*.log "${operator_dir}"/*.bpte \
44+
"${operator_dir}/sdkconfig" "${operator_dir}"/*.elf \
45+
"${operator_dir}/merged-binary.bin"; do
46+
if [[ -f "${file}" ]]; then
47+
cp "${file}" "${artifact_dir}/"
48+
fi
49+
done
50+
done
2751
fi
2852
}
2953
trap collect_artifacts EXIT
@@ -34,13 +58,27 @@ source "${ESPRESSIF_TOOLS_DIR}/setup_path.sh"
3458

3559
python examples/espressif/export_smoke_model.py \
3660
--output "${build_dir}/smoke.bpte" 2>&1 | tee "${build_dir}/export.log"
61+
python examples/espressif/export_espnn_test_programs.py \
62+
--output-dir "${build_dir}/espnn-tests" 2>&1 | tee "${build_dir}/espnn-export.log"
63+
64+
# One runtime serves the smoke test and the ESP-NN programs. quantized_ops_lib
65+
# registers kernels outside the selected list, so the registry is sized
66+
# explicitly instead of from the list. The quantized kernels' parallel_for
67+
# runs inline without pthreadpool, which needs POSIX calls ESP-IDF lacks.
68+
espnn_ops=$(tr -d '\n' < "${build_dir}/espnn-tests/operators.txt" \
69+
| tr ',' '\n' | grep -v '^quantized_decomposed::' | paste -sd, -)
70+
if [[ "${espnn_kernels}" == optimized ]]; then
71+
espnn_ops="${espnn_ops},aten::sin.out"
72+
fi
3773

3874
cmake --preset esp-baremetal -G Ninja -B "${build_dir}/runtime" \
3975
-DCMAKE_TOOLCHAIN_FILE="${IDF_PATH}/tools/cmake/toolchain-esp32s3.cmake" \
4076
-DCMAKE_BUILD_TYPE=Release \
4177
-DEXECUTORCH_BUILD_DEVTOOLS=ON \
42-
-DEXECUTORCH_BUILD_KERNELS_QUANTIZED=OFF \
43-
-DEXECUTORCH_SELECT_OPS_LIST=aten::add.out,aten::mul.out \
78+
-DEXECUTORCH_BUILD_KERNELS_QUANTIZED=ON \
79+
-DEXECUTORCH_SELECT_OPS_LIST="aten::add.out,aten::mul.out,${espnn_ops}" \
80+
-DMAX_KERNEL_NUM=256 \
81+
-DEXECUTORCH_BUILD_PTHREADPOOL=OFF -DEXECUTORCH_BUILD_CPUINFO=OFF \
4482
2>&1 | tee "${build_dir}/runtime-configure.log"
4583
cmake --build "${build_dir}/runtime" \
4684
2>&1 | tee "${build_dir}/runtime-build.log"
@@ -66,3 +104,64 @@ timeout 130s esp-emu --chip esp32s3 \
66104
--net user --psram-size 8M --timeout 120s --exit-on 'Program complete.' \
67105
2>&1 | tee "${build_dir}/emulator.log"
68106
python examples/espressif/test_emulator.py "${build_dir}/emulator.log"
107+
108+
# ESP-NN backend: run every exported program through the ExecuTorch runtime
109+
# and the ESP-NN delegate, and check it against the bundled host reference.
110+
espnn_firmware_dir="${build_dir}/espnn-${espnn_kernels}-firmware"
111+
espnn_sdkconfig="${build_dir}/espnn-${espnn_kernels}-sdkconfig"
112+
espnn_defaults="${build_dir}/espnn-${espnn_kernels}.defaults"
113+
printf '%s=y\n' "${espnn_config}" > "${espnn_defaults}"
114+
# Runs a command with its output in a log, and shows the log's tail on failure.
115+
logged() {
116+
local log="${build_dir}/$1"
117+
shift
118+
if ! "$@" > "${log}" 2>&1; then
119+
tail -n 60 "${log}"
120+
echo "FAIL: see ${log}" >&2
121+
return 1
122+
fi
123+
}
124+
while read -r -u 3 name atol rtol; do
125+
espnn_log_prefix="espnn-${espnn_kernels}-${name}"
126+
logged "${espnn_log_prefix}-configure.log" \
127+
idf.py -C examples/espressif/project -B "${espnn_firmware_dir}" \
128+
-DIDF_TARGET=esp32s3 \
129+
-DSDKCONFIG="${espnn_sdkconfig}" \
130+
"-DSDKCONFIG_DEFAULTS=sdkconfig.defaults;${espnn_defaults}" \
131+
-DET_ESPNN_BACKEND=ON \
132+
-DET_BUILD_DIR_PATH="${build_dir}/runtime" \
133+
-DET_PTE_FILE_PATH="${build_dir}/espnn-tests/${name}.bpte" \
134+
-DET_BUNDLE_IO=ON -DET_NUM_INFERENCES=1 \
135+
-DET_ATOL="${atol}" -DET_RTOL="${rtol}" reconfigure
136+
if ! grep -qx "${espnn_config}=y" "${espnn_sdkconfig}"; then
137+
echo "Expected ${espnn_config}=y in ${espnn_sdkconfig}" >&2
138+
exit 1
139+
fi
140+
logged "${espnn_log_prefix}-build.log" cmake --build "${espnn_firmware_dir}"
141+
logged "${espnn_log_prefix}-merge.log" \
142+
idf.py -C examples/espressif/project -B "${espnn_firmware_dir}" merge-bin
143+
logged "${espnn_log_prefix}-emulator.log" \
144+
timeout 90s esp-emu --chip esp32s3 \
145+
--firmware "${espnn_firmware_dir}/merged-binary.bin" \
146+
--elf "${espnn_firmware_dir}/executorch_esp_runner.elf" \
147+
--net user --psram-size 8M --timeout 60s --exit-on 'Program complete.'
148+
echo -n "${espnn_kernels}/${name}: "
149+
python examples/espressif/test_emulator.py "${build_dir}/${espnn_log_prefix}-emulator.log"
150+
done 3< <(python -c '
151+
import json, sys
152+
for entry in json.load(open(sys.argv[1])):
153+
print(entry["name"], entry["atol"], entry["rtol"])
154+
' "${build_dir}/espnn-tests/manifest.json")
155+
156+
if [[ "${espnn_kernels}" == optimized ]]; then
157+
# Stop on failure so later cases cannot overwrite its firmware and logs.
158+
ESPRESSIF_BUILD_DIR="${build_dir}" python -m pytest \
159+
-x -v --tb=short backends/espressif/test/ops -k implementation \
160+
2>&1 | tee "${build_dir}/operator-library-tests.log"
161+
for sdkconfig in "${build_dir}"/operator-library-*/sdkconfig; do
162+
if ! grep -qx 'CONFIG_NN_OPTIMIZED=y' "${sdkconfig}"; then
163+
echo "Expected CONFIG_NN_OPTIMIZED=y in ${sdkconfig}" >&2
164+
exit 1
165+
fi
166+
done
167+
fi

0 commit comments

Comments
 (0)