Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Fix test script #396

Merged
merged 1 commit into from
Dec 11, 2023
Merged
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
4 changes: 3 additions & 1 deletion scripts/e2e_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ if [[ $# -ne 7 ]] ; then
echo "Both a keras and a tensorflow saved model is supported."
echo
echo "This script expects a python version in the PATH with a recent version of tensorflow installed."
echo "Tested with python 3.8.10 and tf-nightly 2.10.0.dev20220519"
echo "Tested with python 3.10.12 and tf-nightly 2.16.0.dev20231102"

exit 1
fi
Expand Down Expand Up @@ -60,6 +60,8 @@ python optimize_tf_dialect.py "$OUTPUT_DIR"/model_tf.mlir "$OUTPUT_DIR"/model_tf
echo "Converting tf dialect to stablehlo dialect"
python tf_to_hlo_dialect.py --hlo-dialect stablehlo "$OUTPUT_DIR"/model_tf_opt.mlir "$OUTPUT_DIR"/model_stablehlo.mlir

"$EMITC_OPT" --canonicalize --inline --symbol-dce "$OUTPUT_DIR"/model_stablehlo.mlir > "$OUTPUT_DIR"/model_canon.mlir

echo "Fixing function name"
FUNCTION_NAME=$(grep -oe "@[^(]*" "$OUTPUT_DIR"/model_canon.mlir)
sed "s/$FUNCTION_NAME/@predict/g" "$OUTPUT_DIR"/model_canon.mlir > "$OUTPUT_DIR"/model_fix_name.mlir
Expand Down