Skip to content

Commit a758535

Browse files
committed
Rename executorch_no_prim_ops to executorch_core
1 parent 339ff9e commit a758535

File tree

16 files changed

+59
-103
lines changed

16 files changed

+59
-103
lines changed

CMakeLists.txt

+17-23
Original file line numberDiff line numberDiff line change
@@ -445,22 +445,22 @@ endif()
445445
add_subdirectory(schema)
446446

447447
#
448-
# executorch_no_prim_ops: Minimal runtime library
448+
# executorch_core: Minimal runtime library
449449
#
450450
# The bare-minimum runtime library, supporting the Program and Method
451451
# interfaces. Does not contain any operators, including primitive ops. Does not
452452
# contain any backends.
453453
#
454454

455455
# Remove any PAL-definition files from the sources.
456-
list(FILTER _executorch_no_prim_ops__srcs EXCLUDE REGEX
456+
list(FILTER _executorch_core__srcs EXCLUDE REGEX
457457
"runtime/platform/default/[^/]*.cpp$"
458458
)
459459

460460
# Add the source file that maps to the requested default PAL implementation.
461461
if(EXECUTORCH_PAL_DEFAULT MATCHES "^(posix|minimal)$")
462462
message(STATUS "executorch: Using PAL default '${EXECUTORCH_PAL_DEFAULT}'")
463-
list(APPEND _executorch_no_prim_ops__srcs
463+
list(APPEND _executorch_core__srcs
464464
"runtime/platform/default/${EXECUTORCH_PAL_DEFAULT}.cpp"
465465
)
466466
else()
@@ -470,44 +470,44 @@ else()
470470
)
471471
endif()
472472

473-
add_library(executorch_no_prim_ops ${_executorch_no_prim_ops__srcs})
474-
target_link_libraries(executorch_no_prim_ops PRIVATE program_schema)
473+
add_library(executorch_core ${_executorch_core__srcs})
474+
target_link_libraries(executorch_core PRIVATE program_schema)
475475
if(EXECUTORCH_USE_DL)
476476
# Check if dl exists for this toolchain and only then link it.
477477
find_library(DL_LIBRARY_EXISTS NAMES dl)
478478
# Check if the library was found
479479
if(DL_LIBRARY_EXISTS)
480-
target_link_libraries(executorch_no_prim_ops PRIVATE dl) # For dladdr()
480+
target_link_libraries(executorch_core PRIVATE dl) # For dladdr()
481481
endif()
482482
endif()
483483
target_include_directories(
484-
executorch_no_prim_ops PUBLIC ${_common_include_directories}
484+
executorch_core PUBLIC ${_common_include_directories}
485485
)
486-
target_compile_options(executorch_no_prim_ops PUBLIC ${_common_compile_options})
486+
target_compile_options(executorch_core PUBLIC ${_common_compile_options})
487487
if(MAX_KERNEL_NUM)
488488
target_compile_definitions(
489-
executorch_no_prim_ops PRIVATE MAX_KERNEL_NUM=${MAX_KERNEL_NUM}
489+
executorch_core PRIVATE MAX_KERNEL_NUM=${MAX_KERNEL_NUM}
490490
)
491491
endif()
492492

493493
if(EXECUTORCH_BUILD_PYBIND AND APPLE)
494494
# shared version
495495
add_library(
496-
executorch_no_prim_ops_shared SHARED ${_executorch_no_prim_ops__srcs}
496+
executorch_core_shared SHARED ${_executorch_core__srcs}
497497
)
498-
target_link_libraries(executorch_no_prim_ops_shared PRIVATE program_schema)
498+
target_link_libraries(executorch_core_shared PRIVATE program_schema)
499499
if(DL_LIBRARY_EXISTS)
500-
target_link_libraries(executorch_no_prim_ops_shared PRIVATE dl) # For dladdr()
500+
target_link_libraries(executorch_core_shared PRIVATE dl) # For dladdr()
501501
endif()
502502
target_include_directories(
503-
executorch_no_prim_ops_shared PUBLIC ${_common_include_directories}
503+
executorch_core_shared PUBLIC ${_common_include_directories}
504504
)
505505
target_compile_options(
506-
executorch_no_prim_ops_shared PUBLIC ${_common_compile_options}
506+
executorch_core_shared PUBLIC ${_common_compile_options}
507507
)
508508
if(MAX_KERNEL_NUM)
509509
target_compile_definitions(
510-
executorch_no_prim_ops_shared PRIVATE MAX_KERNEL_NUM=${MAX_KERNEL_NUM}
510+
executorch_core_shared PRIVATE MAX_KERNEL_NUM=${MAX_KERNEL_NUM}
511511
)
512512
endif()
513513
endif()
@@ -520,7 +520,7 @@ endif()
520520
# any backends.
521521
#
522522
add_library(executorch ${_executorch__srcs})
523-
target_link_libraries(executorch PRIVATE executorch_no_prim_ops)
523+
target_link_libraries(executorch PRIVATE executorch_core)
524524
target_include_directories(executorch PUBLIC ${_common_include_directories})
525525
target_compile_options(executorch PUBLIC ${_common_compile_options})
526526
target_link_options_shared_lib(executorch)
@@ -560,7 +560,7 @@ endif()
560560
# Install `executorch` library as well as `executorch-config.cmake` under
561561
# ${CMAKE_INSTALL_PREFIX}/
562562
install(
563-
TARGETS executorch executorch_no_prim_ops
563+
TARGETS executorch executorch_core
564564
DESTINATION lib
565565
INCLUDES
566566
DESTINATION ${_common_include_directories}
@@ -793,16 +793,11 @@ function(executorch_runtime target_name)
793793

794794
cmake_parse_arguments(ETR "${options}" "" "${multi_value_args}" ${ARGN})
795795

796-
message(STATUS "executorch_runtime: ${target_name}")
797-
message(STATUS "ETR_BACKEND: ${ETR_BACKEND}")
798-
799796
set(runtime_deps executorch)
800797

801798
# Link backends.
802799
foreach(backend IN LISTS ETR_BACKEND)
803-
message(STATUS "backend: ${backend}")
804800
string(TOLOWER "${backend}" backend_l)
805-
message(STATUS "backend_l: ${backend_l}")
806801

807802
if(backend_l STREQUAL "coreml")
808803
list(APPEND runtime_deps coremldelegate)
@@ -822,7 +817,6 @@ function(executorch_runtime target_name)
822817
# Link extensions.
823818
foreach(extension IN LISTS ETR_EXTENSION)
824819
string(TOLOWER "${extension}" extension_l)
825-
message(STATUS "Extension ${extension_l}")
826820

827821
if(extension_l STREQUAL "apple")
828822
list(APPEND runtime_deps extension_apple)

backends/apple/coreml/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ target_include_directories(
128128
coremldelegate PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/runtime/util
129129
)
130130
target_include_directories(coremldelegate PRIVATE ${EXECUTORCH_ROOT}/..)
131-
target_link_libraries(coremldelegate PRIVATE executorch_no_prim_ops)
131+
target_link_libraries(coremldelegate PRIVATE executorch_core)
132132

133133
if(EXECUTORCH_BUILD_SDK)
134134
target_sources(coremldelegate PRIVATE ${SDK_SOURCES} ${PROTOBUF_SOURCES})
@@ -151,7 +151,7 @@ find_library(SQLITE_LIBRARY sqlite3)
151151

152152
target_link_libraries(
153153
coremldelegate
154-
PRIVATE executorch_no_prim_ops ${ACCELERATE_FRAMEWORK} ${COREML_FRAMEWORK}
154+
PRIVATE executorch_core ${ACCELERATE_FRAMEWORK} ${COREML_FRAMEWORK}
155155
${FOUNDATION_FRAMEWORK} ${SQLITE_LIBRARY}
156156
)
157157

@@ -168,7 +168,7 @@ target_compile_options(coremldelegate PRIVATE "-fno-exceptions")
168168

169169
if(EXECUTORCH_BUILD_SDK)
170170
target_compile_options(
171-
executorch_no_prim_ops PUBLIC -DET_EVENT_TRACER_ENABLED
171+
executorch_core PUBLIC -DET_EVENT_TRACER_ENABLED
172172
)
173173
target_compile_options(coremldelegate PRIVATE "-frtti")
174174
target_compile_options(libprotobuf-lite PRIVATE "-frtti")

backends/apple/coreml/scripts/build_tests.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ cmake --build "$CMAKE_PROTOBUF_BUILD_DIR_PATH" -j9 -t libprotobuf-lite
5959
echo "ExecuTorch: Copying libraries"
6060
mkdir "$LIBRARIES_DIR_PATH"
6161
cp -f "$CMAKE_EXECUTORCH_BUILD_DIR_PATH/libexecutorch.a" "$LIBRARIES_DIR_PATH"
62-
cp -f "$CMAKE_EXECUTORCH_BUILD_DIR_PATH/libexecutorch_no_prim_ops.a" "$LIBRARIES_DIR_PATH"
62+
cp -f "$CMAKE_EXECUTORCH_BUILD_DIR_PATH/libexecutorch_core.a" "$LIBRARIES_DIR_PATH"
6363
cp -f "$CMAKE_PROTOBUF_BUILD_DIR_PATH/libprotobuf-lite.a" "$LIBRARIES_DIR_PATH"
6464

6565
#Copy ExecuTorch headers

backends/apple/mps/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ target_link_libraries(
7575
mpsdelegate
7676
PRIVATE bundled_program
7777
mps_schema
78-
executorch_no_prim_ops
78+
executorch_core
7979
${FOUNDATION_FRAMEWORK}
8080
${METAL_FRAMEWORK}
8181
${MPS_FRAMEWORK}

backends/qualcomm/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ target_link_libraries(
183183
)
184184
target_link_libraries(
185185
qnn_executorch_backend PRIVATE qnn_executorch_header qnn_schema qnn_manager
186-
executorch_no_prim_ops qcir_utils
186+
executorch_core qcir_utils
187187
)
188188
target_link_libraries(utils PRIVATE qnn_executorch_logging)
189189
target_link_libraries(

backends/xnnpack/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ include(cmake/Dependencies.cmake)
8484
list(TRANSFORM _xnnpack_backend__srcs PREPEND "${EXECUTORCH_ROOT}/")
8585
add_library(xnnpack_backend STATIC ${_xnnpack_backend__srcs})
8686
target_link_libraries(
87-
xnnpack_backend PRIVATE ${xnnpack_third_party} executorch_no_prim_ops
87+
xnnpack_backend PRIVATE ${xnnpack_third_party} executorch_core
8888
xnnpack_schema
8989
)
9090

build/Codegen.cmake

+2-2
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,10 @@ function(gen_custom_ops_aot_lib)
151151

152152
target_link_options_shared_lib(${GEN_LIB_NAME})
153153
if(EXECUTORCH_BUILD_PYBIND AND APPLE)
154-
target_link_libraries(${GEN_LIB_NAME} PRIVATE executorch_no_prim_ops)
154+
target_link_libraries(${GEN_LIB_NAME} PRIVATE executorch_core)
155155
target_link_options(${GEN_LIB_NAME} PRIVATE -undefined dynamic_lookup)
156156
else()
157-
target_link_libraries(${GEN_LIB_NAME} PRIVATE executorch_no_prim_ops)
157+
target_link_libraries(${GEN_LIB_NAME} PRIVATE executorch_core)
158158
endif()
159159
endfunction()
160160

build/cmake_deps.toml

+18-18
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ buck_targets = [
2020
"//runtime/executor:program",
2121
]
2222
deps = [
23-
"executorch_no_prim_ops",
23+
"executorch_core",
2424
]
2525
filters = [
2626
".cpp$",
2727
]
2828

2929

30-
[targets.executorch_no_prim_ops]
30+
[targets.executorch_core]
3131
buck_targets = [
32-
"//runtime/executor:program_no_prim_ops",
32+
"//runtime/executor:program_core",
3333
]
3434
deps = [
3535
"program_schema",
@@ -55,7 +55,7 @@ excludes = [
5555
]
5656
deps = [
5757
"executorch",
58-
"executorch_no_prim_ops",
58+
"executorch_core",
5959
]
6060

6161
[targets.optimized_kernels]
@@ -72,7 +72,7 @@ excludes = [
7272
]
7373
deps = [
7474
"executorch",
75-
"executorch_no_prim_ops",
75+
"executorch_core",
7676
"portable_kernels",
7777
]
7878

@@ -90,7 +90,7 @@ excludes = [
9090
]
9191
deps = [
9292
"executorch",
93-
"executorch_no_prim_ops",
93+
"executorch_core",
9494
"portable_kernels",
9595
]
9696

@@ -112,7 +112,7 @@ filters = [
112112
excludes = [
113113
]
114114
deps = [
115-
"executorch_no_prim_ops",
115+
"executorch_core",
116116
"executorch",
117117
]
118118

@@ -129,7 +129,7 @@ filters = [
129129
".cpp$",
130130
]
131131
deps = [
132-
"executorch_no_prim_ops",
132+
"executorch_core",
133133
"executorch",
134134
]
135135

@@ -142,7 +142,7 @@ filters = [
142142
]
143143
deps = [
144144
"executorch",
145-
"executorch_no_prim_ops",
145+
"executorch_core",
146146
"extension_data_loader",
147147
]
148148

@@ -155,7 +155,7 @@ filters = [
155155
]
156156
deps = [
157157
"executorch",
158-
"executorch_no_prim_ops",
158+
"executorch_core",
159159
]
160160

161161
# ---------------------------------- extension end ----------------------------------
@@ -173,7 +173,7 @@ excludes = [
173173
]
174174
deps = [
175175
"executorch",
176-
"executorch_no_prim_ops",
176+
"executorch_core",
177177
"portable_kernels",
178178
"quantized_kernels",
179179
]
@@ -189,7 +189,7 @@ excludes = [
189189
"^codegen",
190190
]
191191
deps = [
192-
"executorch_no_prim_ops",
192+
"executorch_core",
193193
"executorch",
194194
]
195195
# ---------------------------------- binary end ----------------------------------
@@ -206,7 +206,7 @@ excludes = [
206206
]
207207
deps = [
208208
"executorch",
209-
"executorch_no_prim_ops",
209+
"executorch_core",
210210
"portable_kernels",
211211
]
212212

@@ -219,7 +219,7 @@ filters = [
219219
]
220220
deps = [
221221
"executorch",
222-
"executorch_no_prim_ops",
222+
"executorch_core",
223223
]
224224

225225
[targets.mps_schema]
@@ -245,7 +245,7 @@ excludes = [
245245
]
246246
deps = [
247247
"executorch",
248-
"executorch_no_prim_ops",
248+
"executorch_core",
249249
"xnnpack_backend",
250250
"portable_kernels",
251251
]
@@ -259,7 +259,7 @@ filters = [
259259
]
260260
deps = [
261261
"executorch",
262-
"executorch_no_prim_ops",
262+
"executorch_core",
263263
]
264264

265265
[targets.xnnpack_schema]
@@ -292,7 +292,7 @@ excludes = [
292292
]
293293
deps = [
294294
"executorch",
295-
"executorch_no_prim_ops",
295+
"executorch_core",
296296
"optimized_kernels",
297297
"xnnpack_backend",
298298
]
@@ -310,7 +310,7 @@ excludes = [
310310
deps = [
311311
"custom_ops",
312312
"executorch",
313-
"executorch_no_prim_ops",
313+
"executorch_core",
314314
"extension_data_loader",
315315
"extension_module",
316316
"portable_kernels",

build/executorch-config.cmake

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
cmake_minimum_required(VERSION 3.19)
1414

1515
set(_root "${CMAKE_CURRENT_LIST_DIR}/../..")
16-
set(required_lib_list executorch executorch_no_prim_ops portable_kernels)
16+
set(required_lib_list executorch executorch_core portable_kernels)
1717
foreach(lib ${required_lib_list})
1818
set(lib_var "LIB_${lib}")
1919
add_library(${lib} STATIC IMPORTED)
@@ -26,7 +26,7 @@ foreach(lib ${required_lib_list})
2626
target_include_directories(${lib} INTERFACE ${_root})
2727
endforeach()
2828

29-
target_link_libraries(executorch INTERFACE executorch_no_prim_ops)
29+
target_link_libraries(executorch INTERFACE executorch_core)
3030

3131
if(CMAKE_BUILD_TYPE MATCHES "Debug")
3232
set(FLATCCRT_LIB flatccrt_d)

examples/arm/executor_runner/CMakeLists.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ set_property(
5454
"${ET_BUILD_DIR_PATH}/libexecutorch.a"
5555
)
5656

57-
add_library(executorch_no_prim_ops STATIC IMPORTED)
57+
add_library(executorch_core STATIC IMPORTED)
5858
set_property(
59-
TARGET executorch_no_prim_ops
60-
PROPERTY IMPORTED_LOCATION "${ET_BUILD_DIR_PATH}/libexecutorch_no_prim_ops.a"
59+
TARGET executorch_core
60+
PROPERTY IMPORTED_LOCATION "${ET_BUILD_DIR_PATH}/libexecutorch_core.a"
6161
)
62-
target_link_libraries(executorch INTERFACE executorch_no_prim_ops)
62+
target_link_libraries(executorch INTERFACE executorch_core)
6363

6464
add_library(executorch_delegate_ethos_u STATIC IMPORTED)
6565
set_property(

0 commit comments

Comments
 (0)