File tree 2 files changed +7
-11
lines changed
backends/apple/coreml/scripts
2 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ SCRIPT_DIR_PATH="$(
10
10
pwd -P
11
11
) "
12
12
13
+ # TODO(jathu): remove the need to fetch coremltools to build deps for coreml_executor_runner.
14
+ # Keep this version in sync with: pyproject.toml
15
+ COREMLTOOLS_VERSION=" 8.1"
16
+
13
17
red=` tput setaf 1`
14
18
green=` tput setaf 2`
15
19
@@ -24,7 +28,7 @@ rm -rf "$COREML_DIR_PATH/third-party"
24
28
mkdir " $COREML_DIR_PATH /third-party"
25
29
26
30
echo " ${green} ExecuTorch: Cloning coremltools."
27
- git clone --depth 1 --branch 8.1 " https://github.com/apple/coremltools.git" $COREMLTOOLS_DIR_PATH
31
+ git clone --depth 1 --branch " ${COREMLTOOLS_VERSION} " " https://github.com/apple/coremltools.git" $COREMLTOOLS_DIR_PATH
28
32
cd $COREMLTOOLS_DIR_PATH
29
33
30
34
STATUS=$?
43
47
44
48
mkdir " $COREMLTOOLS_DIR_PATH /build"
45
49
cmake -S " $COREMLTOOLS_DIR_PATH " -B " $COREMLTOOLS_DIR_PATH /build"
46
- cmake --build " $COREMLTOOLS_DIR_PATH /build" --parallel
47
-
48
- echo " ${green} ExecuTorch: Cloning nlohmann."
49
- git clone https://github.com/nlohmann/json.git " $COREML_DIR_PATH /third-party/nlohmann_json"
50
- STATUS=$?
51
- if [ $STATUS -ne 0 ]; then
52
- echo " ${red} ExecuTorch: Failed to clone nlohmann."
53
- exit 1
54
- fi
50
+ cmake --build " $COREMLTOOLS_DIR_PATH /build" --parallel --target mlmodel
55
51
56
52
echo " ${green} ExecuTorch: Copying protobuf files."
57
53
mkdir -p " $COREML_DIR_PATH /runtime/sdk/format/"
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ dependencies=[
67
67
" sympy" ,
68
68
" tabulate" ,
69
69
" typing-extensions" ,
70
- # macOS Only
70
+ # Keep this version in sync with: ./backends/apple/coreml/scripts/install_requirements.sh
71
71
" coremltools==8.1; platform_system == 'Darwin'" ,
72
72
]
73
73
You can’t perform that action at this time.
0 commit comments