From cdfbad3912665cfce06eb201e276a4f883c23ea4 Mon Sep 17 00:00:00 2001 From: Benjamin Klimczak Date: Wed, 4 Dec 2024 14:10:11 +0000 Subject: [PATCH] Work around flatccrt issue in CI script When running build-qnn-sdk.sh in certain circumstances the libflatccrt.a cannot be found. To work around this we can build the QNN backend twice, second time with option `--no_clean`, to make sure the library is found. Resolves: #7300 Change-Id: I47e14f1fa318538587b848ee02240f7867c88f50 Signed-off-by: Benjamin Klimczak --- .ci/scripts/build-qnn-sdk.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.ci/scripts/build-qnn-sdk.sh b/.ci/scripts/build-qnn-sdk.sh index deeaed34ac3..463a46f5395 100644 --- a/.ci/scripts/build-qnn-sdk.sh +++ b/.ci/scripts/build-qnn-sdk.sh @@ -1,5 +1,6 @@ #!/bin/bash # Copyright (c) Meta Platforms, Inc. and affiliates. +# Copyright 2025 Arm Limited and/or its affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the @@ -14,7 +15,13 @@ build_qnn_backend() { export QNN_SDK_ROOT=/tmp/qnn/2.25.0.240728 export EXECUTORCH_ROOT="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/../.." && pwd)" - bash backends/qualcomm/scripts/build.sh --skip_aarch64 --job_number 2 --release + # Workaround to avoid issues around missing flatccrt library (depending on the + # number of jobs used), see issue #7300: + # Build twice (second time with `--no_clean`) to make sure libflatccrt.a is + # available. + # TODO: Remove this workaround once the underlying issue is fixed. + bash backends/qualcomm/scripts/build.sh --skip_aarch64 --job_number 2 --release || \ + bash backends/qualcomm/scripts/build.sh --skip_aarch64 --job_number 2 --release --no_clean } set_up_aot() {