File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -185,12 +185,15 @@ test_model_with_coreml() {
185185
186186 " ${PYTHON_EXECUTABLE} " -m examples.apple.coreml.scripts.export --model_name=" ${MODEL_NAME} " --compute_precision " ${DTYPE} "
187187 EXPORTED_MODEL=$( find " ." -type f -name " ${MODEL_NAME} *.pte" -print -quit)
188- # TODO:
188+
189189 if [ -n " $EXPORTED_MODEL " ]; then
190190 EXPORTED_MODEL_WITH_DTYPE=" ${EXPORTED_MODEL% .pte} _${DTYPE} .pte"
191191 mv " $EXPORTED_MODEL " " $EXPORTED_MODEL_WITH_DTYPE "
192192 EXPORTED_MODEL=" $EXPORTED_MODEL_WITH_DTYPE "
193193 echo " Renamed file path: $EXPORTED_MODEL "
194+
195+ bash ./examples/apple/coreml/scripts/build_executor_runner.sh
196+ ./coreml_executor_runner --model_path " ${EXPORTED_MODEL} "
194197 else
195198 echo " No .pte file found"
196199 exit 1
@@ -200,6 +203,11 @@ test_model_with_coreml() {
200203test_model_with_mps () {
201204 " ${PYTHON_EXECUTABLE} " -m examples.apple.mps.scripts.mps_example --model_name=" ${MODEL_NAME} " --use_fp16
202205 EXPORTED_MODEL=$( find " ." -type f -name " ${MODEL_NAME} *.pte" -print -quit)
206+
207+ if [ -n " $EXPORTED_MODEL " ]; then
208+ bash ./examples/apple/mps/scripts/build_mps_executor_runner.sh
209+ ./${CMAKE_OUTPUT_DIR} /examples/apple/mps/mps_executor_runner --model_path " ${EXPORTED_MODEL} " --bundled_program
210+ fi
203211}
204212
205213if [[ " ${BACKEND} " == " portable" ]]; then
You can’t perform that action at this time.
0 commit comments