Skip to content

Commit f2a1eae

Browse files
author
Guang Yang
committed
Run CoreML and MPS models in CI
1 parent 5d12e5b commit f2a1eae

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.ci/scripts/test_model.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ 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"
@@ -200,6 +200,11 @@ test_model_with_coreml() {
200200
test_model_with_mps() {
201201
"${PYTHON_EXECUTABLE}" -m examples.apple.mps.scripts.mps_example --model_name="${MODEL_NAME}" --use_fp16
202202
EXPORTED_MODEL=$(find "." -type f -name "${MODEL_NAME}*.pte" -print -quit)
203+
204+
if [ -n "$EXPORTED_MODEL" ]; then
205+
bash ./examples/apple/mps/scripts/build_mps_executor_runner.sh
206+
./${CMAKE_OUTPUT_DIR}/examples/apple/mps/mps_executor_runner --model_path "${EXPORTED_MODEL}" --bundled_program
207+
fi
203208
}
204209

205210
if [[ "${BACKEND}" == "portable" ]]; then

0 commit comments

Comments
 (0)