File tree Expand file tree Collapse file tree 5 files changed +25
-15
lines changed
examples/apple/coreml/scripts Expand file tree Collapse file tree 5 files changed +25
-15
lines changed Original file line number Diff line number Diff line change @@ -224,19 +224,22 @@ test_model_with_coreml() {
224
224
225
225
" ${PYTHON_EXECUTABLE} " -m examples.apple.coreml.scripts.export --model_name=" ${MODEL_NAME} " --compute_precision " ${DTYPE} "
226
226
EXPORTED_MODEL=$( find " ." -type f -name " ${MODEL_NAME} *.pte" -print -quit)
227
- # TODO:
227
+
228
228
if [ -n " $EXPORTED_MODEL " ]; then
229
229
EXPORTED_MODEL_WITH_DTYPE=" ${EXPORTED_MODEL% .pte} _${DTYPE} .pte"
230
230
mv " $EXPORTED_MODEL " " $EXPORTED_MODEL_WITH_DTYPE "
231
231
EXPORTED_MODEL=" $EXPORTED_MODEL_WITH_DTYPE "
232
- echo " Renamed file path : $EXPORTED_MODEL "
232
+ echo " OK exported model : $EXPORTED_MODEL "
233
233
else
234
- echo " No .pte file found"
234
+ echo " [error] failed to export model: no .pte file found"
235
235
exit 1
236
236
fi
237
237
238
238
# Run the model
239
239
if [ " ${should_test} " = true ]; then
240
+ echo " Installing requirements needed to build coreml_executor_runner..."
241
+ backends/apple/coreml/scripts/install_requirements.sh
242
+
240
243
echo " Testing exported model with coreml_executor_runner..."
241
244
local out_dir=$( mktemp -d)
242
245
COREML_EXECUTOR_RUNNER_OUT_DIR=" ${out_dir} " examples/apple/coreml/scripts/build_executor_runner.sh
Original file line number Diff line number Diff line change 11
11
if __name__ == "__main__" :
12
12
test_base .run_tests (
13
13
model_tests = [
14
- test_base .ModelTest (
15
- model = Model .Mv3 ,
16
- backend = Backend .XnnpackQuantizationDelegation ,
17
- ),
18
- # Enable this once CoreML is suppported out-of-the-box
19
- # https://github.com/pytorch/executorch/issues/9019
20
14
# test_base.ModelTest(
21
15
# model=Model.Mv3,
22
- # backend=Backend.CoreMlTest,
23
- # )
16
+ # backend=Backend.XnnpackQuantizationDelegation,
17
+ # ),
18
+ test_base .ModelTest (
19
+ model = Model .Mv3 ,
20
+ backend = Backend .CoreMlTest ,
21
+ )
24
22
]
25
23
)
Original file line number Diff line number Diff line change 6
6
paths :
7
7
- .ci/**/*
8
8
- .github/workflows/build-wheels-linux.yml
9
+ - examples/**/*
10
+ - pyproject.toml
11
+ - setup.py
9
12
push :
10
13
branches :
11
14
- nightly
44
47
smoke-test-script : .ci/scripts/wheel/test_linux.py
45
48
package-name : executorch
46
49
name : ${{ matrix.repository }}
47
- uses : pytorch/test-infra/.github/workflows/build_wheels_linux.yml@main
50
+ uses : pytorch/test-infra/.github/workflows/build_wheels_linux.yml@367b9fe49625dc325860da10c5ba1ba0d51c1ec8
48
51
with :
49
52
repository : ${{ matrix.repository }}
50
53
ref : " "
Original file line number Diff line number Diff line change 6
6
paths :
7
7
- .ci/**/*
8
8
- .github/workflows/build-wheels-macos.yml
9
+ - examples/**/*
10
+ - pyproject.toml
11
+ - setup.py
9
12
push :
10
13
branches :
11
14
- nightly
57
60
pre-script : ${{ matrix.pre-script }}
58
61
post-script : ${{ matrix.post-script }}
59
62
package-name : ${{ matrix.package-name }}
60
- runner-type : macos-m1-stable
63
+ # Meta's macOS runners do not have Xcode, so use GitHub's runners.
64
+ runner-type : macos-latest-xlarge
65
+ setup-miniconda : true
61
66
smoke-test-script : ${{ matrix.smoke-test-script }}
62
67
trigger-event : ${{ github.event_name }}
Original file line number Diff line number Diff line change @@ -42,8 +42,9 @@ cmake "$EXECUTORCH_ROOT_PATH" -B"$CMAKE_BUILD_DIR_PATH" \
42
42
-DCOREML_BUILD_EXECUTOR_RUNNER=ON \
43
43
-DCMAKE_MACOSX_BUNDLE=OFF
44
44
45
- cmake --build " $CMAKE_BUILD_DIR_PATH " -j9 -t coremldelegate
46
- cmake --build " $CMAKE_BUILD_DIR_PATH " -j9 -t etdump -t flatccrt
45
+ _cores=$(( $(sysctl - n hw.ncpu) - 1 ))
46
+ cmake --build " $CMAKE_BUILD_DIR_PATH " -j" ${_cores} " -t coremldelegate
47
+ cmake --build " $CMAKE_BUILD_DIR_PATH " -j" ${_cores} " -t etdump -t flatccrt
47
48
48
49
# Copy CoreML delegate headers
49
50
echo " ExecuTorch: Copying headers"
You can’t perform that action at this time.
0 commit comments