From d479e137fedd8e93aab2a4df87d421c49b62d626 Mon Sep 17 00:00:00 2001 From: mariecwhite Date: Wed, 12 Jun 2024 07:36:50 +0000 Subject: [PATCH] Fix TFLite build --- .github/workflows/run_mobile_comparative_benchmark.yml | 1 + experimental/tflite/build_tflite.sh | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run_mobile_comparative_benchmark.yml b/.github/workflows/run_mobile_comparative_benchmark.yml index 131f54a0..a8abf750 100644 --- a/.github/workflows/run_mobile_comparative_benchmark.yml +++ b/.github/workflows/run_mobile_comparative_benchmark.yml @@ -13,6 +13,7 @@ on: schedule: # Scheduled to run at 09:00 UTC and 21:00 UTC. - cron: '0 09,21 * * *' + pull_request: concurrency: # A PR number if a pull request and otherwise the commit hash. This cancels diff --git a/experimental/tflite/build_tflite.sh b/experimental/tflite/build_tflite.sh index e2472939..d6a6c836 100755 --- a/experimental/tflite/build_tflite.sh +++ b/experimental/tflite/build_tflite.sh @@ -41,7 +41,9 @@ pushd tensorflow # Log the git version of Tensorflow repo. git log --oneline --graph --max-count=1 -bazel build -c opt --define xnnpack_use_latest_ops=true //tensorflow/lite/tools/benchmark:benchmark_model +# Disable avx512fp16 on build servers due to a gcc compiler error: +# gcc: error: unrecognized command-line option '-mavx512fp16' +bazel build -c opt --define xnnpack_use_latest_ops=true --define xnn_enable_avx512fp16=false --define avx512fp16_enabled=false //tensorflow/lite/tools/benchmark:benchmark_model cp "$(realpath bazel-bin/tensorflow/lite/tools/benchmark/benchmark_model)" "${X86_OUTPUT_DIR}/" # The compiler flags used here were retrieved by running ./configure in the root Tensorflow repo.