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

Commit

Permalink
Fix test script (#396)
Browse files Browse the repository at this point in the history
  • Loading branch information
marbre authored Dec 11, 2023
1 parent d4c6d6e commit 1f15179
Showing 1 changed file with 3 additions and 1 deletion.
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

0 comments on commit 1f15179

Please sign in to comment.