Skip to content

Commit abe0ddf

Browse files
authored
Merge branch 'main' into gh/SS-JIA/232/orig
2 parents 72a67e2 + 450d1f9 commit abe0ddf

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

.ci/scripts/utils.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,7 @@ build_executorch_runner() {
158158
cmake_install_executorch_lib() {
159159
echo "Installing libexecutorch.a and libportable_kernels.a"
160160
clean_executorch_install_folders
161-
retry cmake -DBUCK2="$BUCK" \
162-
-DCMAKE_INSTALL_PREFIX=cmake-out \
161+
retry cmake -DCMAKE_INSTALL_PREFIX=cmake-out \
163162
-DCMAKE_BUILD_TYPE=Release \
164163
-DPYTHON_EXECUTABLE="$PYTHON_EXECUTABLE" \
165164
-Bcmake-out .

docs/source/backends-coreml.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,12 @@ Note that if the ExecuTorch model has graph breaks, there may be multiple extrac
195195

196196
## Common issues and what to do
197197

198-
During lowering to the CoreML backend, you might see an error like: "ValueError: In op, of type [X], named [Y], the named input [Z] must have the same data type as the named input x. However, [Z] has dtype fp32 whereas x has dtype fp16."
198+
### During lowering
199+
1. "ValueError: In op, of type [X], named [Y], the named input [Z] must have the same data type as the named input x. However, [Z] has dtype fp32 whereas x has dtype fp16."
199200

200201
This happens because the model is in FP16, but CoreML interprets some of the arguments as FP32, which leads to a type mismatch. The solution is to keep the PyTorch model in FP32. Note that the model will be still be converted to FP16 during lowering to CoreML unless specified otherwise in the compute_precision [CoreML CompileSpec](#coreml-compilespec). Also see the [related issue in coremltools](https://github.com/apple/coremltools/issues/2480).
202+
203+
2. coremltools/converters/mil/backend/mil/load.py", line 499, in export
204+
raise RuntimeError("BlobWriter not loaded")
205+
206+
If you're using Python 3.13, try reducing your python version to Python 3.12. coremltools does not support Python 3.13, see this [issue](https://github.com/apple/coremltools/issues/2487).

examples/selective_build/test_selective_build.sh

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ test_cmake_select_all_ops() {
9292
local example_dir=examples/selective_build
9393
local build_dir=cmake-out/${example_dir}
9494
rm -rf ${build_dir}
95-
retry cmake -DBUCK2="$BUCK" \
96-
-DCMAKE_BUILD_TYPE=Release \
95+
retry cmake -DCMAKE_BUILD_TYPE=Release \
9796
-DEXECUTORCH_SELECT_ALL_OPS=ON \
9897
-DCMAKE_INSTALL_PREFIX=cmake-out \
9998
-DPYTHON_EXECUTABLE="$PYTHON_EXECUTABLE" \
@@ -118,8 +117,7 @@ test_cmake_select_ops_in_list() {
118117
local build_dir=cmake-out/${example_dir}
119118
# set MAX_KERNEL_NUM=22: 19 primops, add, mul
120119
rm -rf ${build_dir}
121-
retry cmake -DBUCK2="$BUCK" \
122-
-DCMAKE_BUILD_TYPE=Release \
120+
retry cmake -DCMAKE_BUILD_TYPE=Release \
123121
-DMAX_KERNEL_NUM=22 \
124122
-DEXECUTORCH_SELECT_OPS_LIST="aten::convolution.out,\
125123
aten::_native_batch_norm_legit_no_training.out,aten::hardtanh.out,aten::add.out,\
@@ -146,8 +144,7 @@ test_cmake_select_ops_in_yaml() {
146144
local example_dir=examples/selective_build
147145
local build_dir=cmake-out/${example_dir}
148146
rm -rf ${build_dir}
149-
retry cmake -DBUCK2="$BUCK" \
150-
-DCMAKE_BUILD_TYPE=Release \
147+
retry cmake -DCMAKE_BUILD_TYPE=Release \
151148
-DEXECUTORCH_SELECT_OPS_YAML=ON \
152149
-DCMAKE_INSTALL_PREFIX=cmake-out \
153150
-DPYTHON_EXECUTABLE="$PYTHON_EXECUTABLE" \

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ classifiers = [
4949
]
5050

5151
# Python dependencies required for use.
52-
requires-python = ">=3.10"
52+
# coremltools has issue with python 3.13, see https://github.com/apple/coremltools/issues/2487
53+
requires-python = ">=3.10,<3.13"
5354
dependencies=[
5455
"expecttest",
5556
"flatbuffers",

0 commit comments

Comments
 (0)