diff --git a/.bazelrc b/.bazelrc index 472dea798b8..1d353ade595 100644 --- a/.bazelrc +++ b/.bazelrc @@ -34,6 +34,8 @@ common --enable_platform_specific_config build:linux --cxxopt=-std=c++17 build:macos --cxxopt=-std=c++17 build:windows --cxxopt=/std:c++17 +build:windows --experimental_strict_action_env +build:windows --features=compiler_param_file # Common options for --config=ci build:ci --action_env=CC=clang diff --git a/tensorflow/compiler/mlir/lite/schema/BUILD b/tensorflow/compiler/mlir/lite/schema/BUILD index c9bfa7298ef..2f36581ae00 100644 --- a/tensorflow/compiler/mlir/lite/schema/BUILD +++ b/tensorflow/compiler/mlir/lite/schema/BUILD @@ -40,6 +40,7 @@ cc_library( deps = [ ":schema_fbs", "//tensorflow/compiler/mlir/lite/kernels/internal:compatibility_macros", + "//tensorflow/lite/schema:schema_fbs", "@flatbuffers//:runtime_cc", ], ) diff --git a/tensorflow/lite/micro/tools/benchmarking/collect_meta_data.sh b/tensorflow/lite/micro/tools/benchmarking/collect_meta_data.sh index 233975150df..83f72827c9e 100755 --- a/tensorflow/lite/micro/tools/benchmarking/collect_meta_data.sh +++ b/tensorflow/lite/micro/tools/benchmarking/collect_meta_data.sh @@ -81,24 +81,21 @@ if [[ ${MODEL_FILE} ]]; then # Some environments (like MSYS2) are externally managed and don't allow pip install. python3 -m pip install absl-py tensorflow || true - if python3 -c "import absl, tensorflow" > /dev/null 2>&1; then - result=$(python3 \ - "${TENSORFLOW_ROOT}tensorflow/lite/micro/tools/benchmarking/analyze_model.py" \ - --model_file="${MODEL_FILE}" \ - ) + if result=$(python3 \ + "${TENSORFLOW_ROOT}tensorflow/lite/micro/tools/benchmarking/analyze_model.py" \ + --model_file="${MODEL_FILE}" 2>/dev/null); then + substitute_strings model_analysis_strings "${result}" else - result="Model analysis not available (missing absl-py or tensorflow)" + substitute_strings model_analysis_strings "Model analysis not available" fi - substitute_strings model_analysis_strings "${result}" - if command -v shasum > /dev/null; then - result=$(shasum -b "${MODEL_FILE}" | cut -f 1 -d ' ') - elif command -v md5sum > /dev/null; then - result=$(md5sum -b "${MODEL_FILE}" | cut -f 1 -d ' ') + if result=$(shasum -b "${MODEL_FILE}" 2>/dev/null | cut -f 1 -d ' '); then + substitute_strings model_sha1_strings "${result}" + elif result=$(md5sum -b "${MODEL_FILE}" 2>/dev/null | cut -f 1 -d ' '); then + substitute_strings model_sha1_strings "${result}" else - result="SHA1 not available" + substitute_strings model_sha1_strings "SHA1 not available" fi - substitute_strings model_sha1_strings "${result}" fi # compile date