Commit a1552b0
committed
Fix duplicate ATen kernel registration in macOS executor_runner
The macOS preset enables both EXECUTORCH_BUILD_KERNELS_OPTIMIZED and
EXECUTORCH_BUILD_EXECUTOR_RUNNER, so the top-level CMake selects
optimized_native_cpu_ops_lib as the runner's ops registration library.
coremldelegate is pulled into the runner's link line through
executorch_backends and force-loaded, and it was also privately linking
portable_ops_lib and portable_kernels whenever
EXECUTORCH_COREML_BUILD_EXECUTOR_RUNNER was on. The runner therefore ended
up with optimized_native_cpu_ops_lib and portable_ops_lib both registering
overlapping ATen kernels at static-init time, aborting before main().
Drop the misplaced portable-kernel link from coremldelegate and remove the
now-unused EXECUTORCH_COREML_BUILD_EXECUTOR_RUNNER option. The option never
gated building a real CMake runner target; the CoreML executor runner under
examples/apple/coreml/executor_runner is an Xcode project, and the
build_executor_runner.sh script that drives it stages libportable_ops_lib.a
and libportable_kernels.a into examples/apple/coreml/executor_runner/libraries/
where the Xcode project links them directly, independent of
libcoremldelegate.a's link list.1 parent fb420f3 commit a1552b0
3 files changed
Lines changed: 0 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | 233 | | |
240 | 234 | | |
241 | 235 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | 197 | | |
202 | 198 | | |
203 | 199 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
0 commit comments