Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions backends/apple/coreml/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -230,12 +230,6 @@ if(APPLE)

executorch_target_link_options_shared_lib(coremldelegate)

if(EXECUTORCH_COREML_BUILD_EXECUTOR_RUNNER)
target_link_libraries(
coremldelegate PRIVATE portable_ops_lib portable_kernels

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where else this is linked?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the top-level CMake configuration, coremldelegate is added to _executorch_backends in CMakeLists.txt:713–715, and then brought into _executor_runner_libs through executorch_backends at CMakeLists.txt:1355–1357. Those libraries are ultimately linked into executor_runner at CMakeLists.txt:1392.
The ops registration library is chosen separately in CMakeLists.txt:1363–1369:

  • optimized_native_cpu_ops_lib when EXECUTORCH_BUILD_KERNELS_OPTIMIZED=ON
  • portable_ops_lib otherwise
    Because of that separation, coremldelegate itself does not need to link against either ops library directly.
    For the standalone CoreML Xcode runner, the setup is also independent of coremldelegate’s CMake dependencies. The script examples/apple/coreml/scripts/build_executor_runner.sh copies libportable_ops_lib.a and libportable_kernels.a into examples/apple/coreml/executor_runner/libraries/, and the Xcode project links them explicitly.
    I also checked several other CMake consumers — including examples/models/llama, examples/models/llava, and examples/devtools. In each case, the ops registration library is selected explicitly before coremldelegate is force-loaded.

)
endif()

target_compile_options(
coremldelegate PRIVATE -fobjc-arc -fno-exceptions -x objective-c++
-Wno-null-character -Wno-receiver-expr
Expand Down
4 changes: 0 additions & 4 deletions tools/cmake/preset/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,6 @@ define_overridable_option(
define_overridable_option(
EXECUTORCH_BUILD_VGF "Build the Arm VGF backend" BOOL OFF
)
define_overridable_option(
EXECUTORCH_COREML_BUILD_EXECUTOR_RUNNER "Build CoreML executor runner." BOOL
OFF
)
define_overridable_option(
EXECUTORCH_BUILD_WASM "Build the ExecuTorch JavaScript API" BOOL OFF
)
Expand Down
1 change: 0 additions & 1 deletion tools/cmake/preset/macos.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ include(${PROJECT_SOURCE_DIR}/tools/cmake/preset/apple_common.cmake)
set_overridable_option(EXECUTORCH_BUILD_EXTENSION_EVALUE_UTIL ON)
set_overridable_option(EXECUTORCH_BUILD_EXTENSION_RUNNER_UTIL ON)
set_overridable_option(EXECUTORCH_BUILD_EXECUTOR_RUNNER ON)
set_overridable_option(EXECUTORCH_COREML_BUILD_EXECUTOR_RUNNER ON)
Loading