Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions tensorflow/compiler/mlir/lite/schema/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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",
],
)
23 changes: 10 additions & 13 deletions tensorflow/lite/micro/tools/benchmarking/collect_meta_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading