File tree 7 files changed +13
-89
lines changed
examples/apple/coreml/scripts
7 files changed +13
-89
lines changed Original file line number Diff line number Diff line change @@ -811,7 +811,7 @@ if(EXECUTORCH_BUILD_PYBIND)
811
811
812
812
if (EXECUTORCH_BUILD_COREML)
813
813
list (APPEND _dep_libs coremldelegate)
814
- list (APPEND _dep_libs coreml_inmemoryfs_pybinding )
814
+ list (APPEND _dep_libs executorchcoreml )
815
815
endif ()
816
816
817
817
if (EXECUTORCH_BUILD_MPS)
@@ -936,7 +936,7 @@ if(EXECUTORCH_BUILD_EXECUTOR_RUNNER)
936
936
937
937
if (EXECUTORCH_BUILD_COREML)
938
938
list (APPEND _executor_runner_libs coremldelegate)
939
- list (APPEND _executor_runner_libs coreml_inmemoryfs_pybinding )
939
+ list (APPEND _executor_runner_libs executorchcoreml )
940
940
endif ()
941
941
942
942
add_executable (executor_runner ${_executor_runner__srcs} )
Original file line number Diff line number Diff line change 16
16
17
17
import coremltools as ct
18
18
import coremltools .optimize as cto
19
- import executorchcoreml
20
19
20
+ from executorch .backends .apple .coreml import executorchcoreml
21
21
from executorch .exir .backend .backend_details import (
22
22
BackendDetails ,
23
23
ExportedProgram ,
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -62,8 +62,6 @@ if [ $STATUS -ne 0 ]; then
62
62
exit 1
63
63
fi
64
64
65
- sh " $COREML_DIR_PATH /scripts/install_inmemoryfs.sh"
66
-
67
65
echo " ${green} ExecuTorch: Copying protobuf files."
68
66
mkdir -p " $COREML_DIR_PATH /runtime/sdk/format/"
69
67
cp -rf " $PROTOBUF_FILES_DIR_PATH " " $COREML_DIR_PATH /runtime/sdk/format/"
Original file line number Diff line number Diff line change 10
10
11
11
from typing import List , Optional
12
12
13
- import executorchcoreml
14
-
13
+ from executorch .backends .apple .coreml import executorchcoreml
15
14
from executorch .backends .apple .coreml .compiler import CoreMLBackend
16
-
17
15
from executorch .exir ._serialize ._program import deserialize_pte_binary
18
-
19
16
from executorch .exir .schema import (
20
17
BackendDelegate ,
21
18
BackendDelegateDataReference ,
Original file line number Diff line number Diff line change @@ -680,6 +680,12 @@ def run(self):
680
680
# add entries like `-DEXECUTORCH_BUILD_XNNPACK=ON` to the CMAKE_ARGS
681
681
# environment variable.
682
682
683
+ if ShouldBuild .coreml ():
684
+ cmake_args += [
685
+ "-DEXECUTORCH_BUILD_COREML=ON" ,
686
+ ]
687
+ build_args += ["--target" , "executorchcoreml" ]
688
+
683
689
if ShouldBuild .llama_custom_ops ():
684
690
cmake_args += [
685
691
"-DEXECUTORCH_BUILD_KERNELS_CUSTOM=ON" , # add llama sdpa ops to pybindings.
@@ -786,12 +792,12 @@ def get_ext_modules() -> List[Extension]:
786
792
]
787
793
)
788
794
789
- if ShouldBuild .pybindings () or ShouldBuild . coreml ():
795
+ if ShouldBuild .coreml ():
790
796
ext_modules .append (
791
797
BuiltExtension (
792
- src = "coreml_inmemoryfs_pybinding .*" ,
798
+ src = "executorchcoreml .*" ,
793
799
src_dir = "backends/apple/coreml" ,
794
- modpath = "executorch.backends.apple.coreml.inmemoryfs " ,
800
+ modpath = "executorch.backends.apple.coreml.executorchcoreml " ,
795
801
)
796
802
)
797
803
You can’t perform that action at this time.
0 commit comments