From afec621f3a84cc0264385b5e83b2a2d99967c099 Mon Sep 17 00:00:00 2001 From: Olivia Liu Date: Thu, 12 Sep 2024 11:52:01 -0700 Subject: [PATCH] Rename cmake option "EXECUTORCH_BUILD_SDK" to "EXECUTORCH_BUILD_DEVTOOLS" (#5272) Summary: Pull Request resolved: https://github.com/pytorch/executorch/pull/5272 Part of the bigger sdk -> devtools rename task. This diff renames the cmake build option for the executorch/devtools dir from "EXECUTORCH_BUILD_SDK" to "EXECUTORCH_BUILD_DEVTOOLS". It's purely a string replacement. Reviewed By: dbort Differential Revision: D62479584 --- .ci/scripts/build-qnn-sdk.sh | 2 +- CMakeLists.txt | 6 +++--- backends/apple/coreml/CMakeLists.txt | 6 +++--- backends/cadence/build_cadence_runner.sh | 2 +- backends/cadence/runtime/executor_main.sh | 2 +- backends/qualcomm/scripts/build.sh | 4 ++-- build/Utils.cmake | 2 +- devtools/targets.bzl | 2 +- docs/source/build-run-qualcomm-ai-engine-direct-backend.md | 4 ++-- docs/source/llm/getting-started.md | 2 +- examples/apple/coreml/scripts/build_executor_runner.sh | 2 +- examples/apple/mps/README.md | 2 +- examples/apple/mps/scripts/build_mps_executor_runner.sh | 2 +- examples/apple/mps/test_mps.sh | 2 +- examples/devtools/build_example_runner.sh | 4 ++-- examples/devtools/test_example_runner.sh | 2 +- kernels/README.md | 2 +- runtime/core/targets.bzl | 2 +- test/run_oss_cpp_tests.sh | 2 +- 19 files changed, 26 insertions(+), 26 deletions(-) diff --git a/.ci/scripts/build-qnn-sdk.sh b/.ci/scripts/build-qnn-sdk.sh index 2492b1fd3d6..deeaed34ac3 100644 --- a/.ci/scripts/build-qnn-sdk.sh +++ b/.ci/scripts/build-qnn-sdk.sh @@ -27,7 +27,7 @@ set_up_aot() { -DCMAKE_INSTALL_PREFIX=$PWD \ -DEXECUTORCH_BUILD_QNN=ON \ -DQNN_SDK_ROOT=${QNN_SDK_ROOT} \ - -DEXECUTORCH_BUILD_SDK=ON \ + -DEXECUTORCH_BUILD_DEVTOOLS=ON \ -DEXECUTORCH_BUILD_EXTENSION_MODULE=ON \ -DEXECUTORCH_BUILD_EXTENSION_TENSOR=ON \ -DEXECUTORCH_ENABLE_EVENT_TRACER=ON \ diff --git a/CMakeLists.txt b/CMakeLists.txt index add38ec56e0..8f9dbff7afc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -197,7 +197,7 @@ option(EXECUTORCH_BUILD_KERNELS_OPTIMIZED "Build the optimized kernels" OFF) option(EXECUTORCH_BUILD_KERNELS_QUANTIZED "Build the quantized kernels" OFF) -option(EXECUTORCH_BUILD_SDK "Build the ExecuTorch Developer Tools") +option(EXECUTORCH_BUILD_DEVTOOLS "Build the ExecuTorch Developer Tools") option(EXECUTORCH_BUILD_SIZE_TEST "Build the size test" OFF) @@ -616,7 +616,7 @@ if(EXECUTORCH_BUILD_XNNPACK) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/backends/xnnpack) endif() -if(EXECUTORCH_BUILD_SDK) +if(EXECUTORCH_BUILD_DEVTOOLS) set(EXECUTORCH_BUILD_EXTENSION_DATA_LOADER ON CACHE BOOL "EXECUTORCH_BUILD_EXTENSION_DATA_LOADER" FORCE @@ -658,7 +658,7 @@ if(EXECUTORCH_BUILD_PYBIND) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/extension/data_loader) endif() - if(NOT EXECUTORCH_BUILD_SDK) + if(NOT EXECUTORCH_BUILD_DEVTOOLS) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/devtools) endif() diff --git a/backends/apple/coreml/CMakeLists.txt b/backends/apple/coreml/CMakeLists.txt index 7f927284cdd..27e09b3f581 100644 --- a/backends/apple/coreml/CMakeLists.txt +++ b/backends/apple/coreml/CMakeLists.txt @@ -13,7 +13,7 @@ if(NOT EXECUTORCH_ROOT) set(EXECUTORCH_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../..) endif() -if(EXECUTORCH_BUILD_SDK) +if(EXECUTORCH_BUILD_DEVTOOLS) # protobuf requires frtti set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -frtti") endif() @@ -136,7 +136,7 @@ target_include_directories( target_include_directories(coremldelegate PRIVATE ${EXECUTORCH_ROOT}/..) target_link_libraries(coremldelegate PRIVATE executorch_no_prim_ops) -if(EXECUTORCH_BUILD_SDK) +if(EXECUTORCH_BUILD_DEVTOOLS) target_sources(coremldelegate PRIVATE ${SDK_SOURCES} ${PROTOBUF_SOURCES}) target_include_directories( coremldelegate @@ -174,7 +174,7 @@ endif() target_compile_options(coremldelegate PRIVATE "-fobjc-arc") target_compile_options(coremldelegate PRIVATE "-fno-exceptions") -if(EXECUTORCH_BUILD_SDK) +if(EXECUTORCH_BUILD_DEVTOOLS) target_compile_options( executorch_no_prim_ops PUBLIC -DET_EVENT_TRACER_ENABLED ) diff --git a/backends/cadence/build_cadence_runner.sh b/backends/cadence/build_cadence_runner.sh index 51f363f8de4..693a320bdf4 100755 --- a/backends/cadence/build_cadence_runner.sh +++ b/backends/cadence/build_cadence_runner.sh @@ -23,7 +23,7 @@ main() { rm -rf cmake-out cmake -DCMAKE_INSTALL_PREFIX=cmake-out \ -DCMAKE_BUILD_TYPE=Release \ - -DEXECUTORCH_BUILD_SDK=ON \ + -DEXECUTORCH_BUILD_DEVTOOLS=ON \ -DEXECUTORCH_ENABLE_EVENT_TRACER=ON \ -DPYTHON_EXECUTABLE=python3 \ -DEXECUTORCH_BUILD_EXTENSION_RUNNER_UTIL=ON \ diff --git a/backends/cadence/runtime/executor_main.sh b/backends/cadence/runtime/executor_main.sh index 2ec472615de..7d6cba09b87 100644 --- a/backends/cadence/runtime/executor_main.sh +++ b/backends/cadence/runtime/executor_main.sh @@ -20,7 +20,7 @@ cmake_install_executorch_devtools_lib() { retry cmake -DCMAKE_INSTALL_PREFIX=cmake-out \ -DCMAKE_BUILD_TYPE=Release \ - -DEXECUTORCH_BUILD_SDK=ON \ + -DEXECUTORCH_BUILD_DEVTOOLS=ON \ -DEXECUTORCH_ENABLE_EVENT_TRACER=ON \ -DPYTHON_EXECUTABLE="$PYTHON_EXECUTABLE" \ -Bcmake-out . diff --git a/backends/qualcomm/scripts/build.sh b/backends/qualcomm/scripts/build.sh index 5f77a747404..4cb2f50bbd2 100755 --- a/backends/qualcomm/scripts/build.sh +++ b/backends/qualcomm/scripts/build.sh @@ -79,7 +79,7 @@ if [ "$BUILD_AARCH64" = true ]; then -DCMAKE_INSTALL_PREFIX=$BUILD_ROOT \ -DCMAKE_BUILD_TYPE=$BUILD_TYPE \ -DEXECUTORCH_BUILD_QNN=ON \ - -DEXECUTORCH_BUILD_SDK=ON \ + -DEXECUTORCH_BUILD_DEVTOOLS=ON \ -DEXECUTORCH_BUILD_EXTENSION_MODULE=ON \ -DEXECUTORCH_BUILD_EXTENSION_TENSOR=ON \ -DEXECUTORCH_ENABLE_EVENT_TRACER=ON \ @@ -123,7 +123,7 @@ if [ "$BUILD_X86_64" = true ]; then -DCMAKE_INSTALL_PREFIX=$BUILD_ROOT \ -DQNN_SDK_ROOT=${QNN_SDK_ROOT} \ -DEXECUTORCH_BUILD_QNN=ON \ - -DEXECUTORCH_BUILD_SDK=ON \ + -DEXECUTORCH_BUILD_DEVTOOLS=ON \ -DEXECUTORCH_BUILD_EXTENSION_MODULE=ON \ -DEXECUTORCH_BUILD_EXTENSION_TENSOR=ON \ -DEXECUTORCH_ENABLE_EVENT_TRACER=ON \ diff --git a/build/Utils.cmake b/build/Utils.cmake index bf04fa1b15c..d9811c8313e 100644 --- a/build/Utils.cmake +++ b/build/Utils.cmake @@ -100,7 +100,7 @@ function(executorch_print_configuration_summary) "${EXECUTORCH_BUILD_KERNELS_QUANTIZED}" ) message( - STATUS " EXECUTORCH_BUILD_SDK : ${EXECUTORCH_BUILD_SDK}" + STATUS " EXECUTORCH_BUILD_DEVTOOLS : ${EXECUTORCH_BUILD_DEVTOOLS}" ) message( STATUS diff --git a/devtools/targets.bzl b/devtools/targets.bzl index 38c2e6e820e..17d9e89cad3 100644 --- a/devtools/targets.bzl +++ b/devtools/targets.bzl @@ -4,5 +4,5 @@ def build_sdk(): def get_sdk_flags(): sdk_flags = [] if build_sdk(): - sdk_flags += ["-DEXECUTORCH_BUILD_SDK"] + sdk_flags += ["-DEXECUTORCH_BUILD_DEVTOOLS"] return sdk_flags diff --git a/docs/source/build-run-qualcomm-ai-engine-direct-backend.md b/docs/source/build-run-qualcomm-ai-engine-direct-backend.md index 230f007d3fc..18da5e25f93 100644 --- a/docs/source/build-run-qualcomm-ai-engine-direct-backend.md +++ b/docs/source/build-run-qualcomm-ai-engine-direct-backend.md @@ -134,7 +134,7 @@ cmake .. \ -DCMAKE_INSTALL_PREFIX=$PWD \ -DEXECUTORCH_BUILD_QNN=ON \ -DQNN_SDK_ROOT=${QNN_SDK_ROOT} \ - -DEXECUTORCH_BUILD_SDK=ON \ + -DEXECUTORCH_BUILD_DEVTOOLS=ON \ -DEXECUTORCH_BUILD_EXTENSION_MODULE=ON \ -DEXECUTORCH_BUILD_EXTENSION_TENSOR=ON \ -DEXECUTORCH_ENABLE_EVENT_TRACER=ON \ @@ -166,7 +166,7 @@ cmake .. \ -DCMAKE_INSTALL_PREFIX=$PWD \ -DEXECUTORCH_BUILD_QNN=ON \ -DQNN_SDK_ROOT=$QNN_SDK_ROOT \ - -DEXECUTORCH_BUILD_SDK=ON \ + -DEXECUTORCH_BUILD_DEVTOOLS=ON \ -DEXECUTORCH_BUILD_EXTENSION_MODULE=ON \ -DEXECUTORCH_BUILD_EXTENSION_TENSOR=ON \ -DEXECUTORCH_ENABLE_EVENT_TRACER=ON \ diff --git a/docs/source/llm/getting-started.md b/docs/source/llm/getting-started.md index 46a5dc604fc..72635f7532f 100644 --- a/docs/source/llm/getting-started.md +++ b/docs/source/llm/getting-started.md @@ -808,7 +808,7 @@ if (result.buf != nullptr && result.size > 0) { Additionally, update CMakeLists.txt to build with Developer Tools and enable events to be traced and logged into ETDump: ``` -option(EXECUTORCH_BUILD_SDK "" ON) +option(EXECUTORCH_BUILD_DEVTOOLS "" ON) # ... diff --git a/examples/apple/coreml/scripts/build_executor_runner.sh b/examples/apple/coreml/scripts/build_executor_runner.sh index b57a8f12e7c..89cd45ea6b1 100755 --- a/examples/apple/coreml/scripts/build_executor_runner.sh +++ b/examples/apple/coreml/scripts/build_executor_runner.sh @@ -36,7 +36,7 @@ cmake "$EXECUTORCH_ROOT_PATH" -B"$CMAKE_BUILD_DIR_PATH" \ -DFLATC_EXECUTABLE="$(which flatc)" \ -DEXECUTORCH_BUILD_EXECUTOR_RUNNER=OFF \ -DEXECUTORCH_BUILD_XNNPACK=OFF \ --DEXECUTORCH_BUILD_SDK=ON \ +-DEXECUTORCH_BUILD_DEVTOOLS=ON \ -DEXECUTORCH_BUILD_COREML=ON \ -Dprotobuf_BUILD_TESTS=OFF \ -Dprotobuf_BUILD_EXAMPLES=OFF \ diff --git a/examples/apple/mps/README.md b/examples/apple/mps/README.md index bebd1329be4..dc01d585f84 100644 --- a/examples/apple/mps/README.md +++ b/examples/apple/mps/README.md @@ -30,7 +30,7 @@ Once we have the model binary file, then let's run it with the ExecuTorch runtim # Build and install executorch cmake -DCMAKE_INSTALL_PREFIX=cmake-out \ -DCMAKE_BUILD_TYPE=Release \ - -DEXECUTORCH_BUILD_SDK=ON \ + -DEXECUTORCH_BUILD_DEVTOOLS=ON \ -DEXECUTORCH_ENABLE_EVENT_TRACER=ON \ -DEXECUTORCH_BUILD_MPS=ON \ -DPYTHON_EXECUTABLE="$PYTHON_EXECUTABLE" \ diff --git a/examples/apple/mps/scripts/build_mps_executor_runner.sh b/examples/apple/mps/scripts/build_mps_executor_runner.sh index 16754588b67..31ab54fd4d3 100755 --- a/examples/apple/mps/scripts/build_mps_executor_runner.sh +++ b/examples/apple/mps/scripts/build_mps_executor_runner.sh @@ -41,7 +41,7 @@ rm -rf "$OUTPUT" cmake -DBUCK2="$BUCK" \ -DCMAKE_INSTALL_PREFIX=cmake-out \ -DCMAKE_BUILD_TYPE="$MODE" \ - -DEXECUTORCH_BUILD_SDK=ON \ + -DEXECUTORCH_BUILD_DEVTOOLS=ON \ -DEXECUTORCH_ENABLE_EVENT_TRACER=ON \ -DEXECUTORCH_BUILD_MPS=ON \ -DPYTHON_EXECUTABLE="$PYTHON_EXECUTABLE" \ diff --git a/examples/apple/mps/test_mps.sh b/examples/apple/mps/test_mps.sh index b7521e5f67f..555161dd3f7 100755 --- a/examples/apple/mps/test_mps.sh +++ b/examples/apple/mps/test_mps.sh @@ -18,7 +18,7 @@ cmake_install_executorch_devtools_lib() { retry cmake -DBUCK2="$BUCK" \ -DCMAKE_INSTALL_PREFIX=cmake-out \ -DCMAKE_BUILD_TYPE=Release \ - -DEXECUTORCH_BUILD_SDK=ON \ + -DEXECUTORCH_BUILD_DEVTOOLS=ON \ -DEXECUTORCH_BUILD_MPS=ON \ -DEXECUTORCH_ENABLE_EVENT_TRACER=ON \ -DPYTHON_EXECUTABLE="$PYTHON_EXECUTABLE" \ diff --git a/examples/devtools/build_example_runner.sh b/examples/devtools/build_example_runner.sh index 06ef545668a..9f35abb1a35 100755 --- a/examples/devtools/build_example_runner.sh +++ b/examples/devtools/build_example_runner.sh @@ -42,7 +42,7 @@ main() { if [[ "${BUILD_COREML}" == "ON" ]]; then cmake -DCMAKE_INSTALL_PREFIX=cmake-out \ -DCMAKE_BUILD_TYPE=Release \ - -DEXECUTORCH_BUILD_SDK=ON \ + -DEXECUTORCH_BUILD_DEVTOOLS=ON \ -DEXECUTORCH_ENABLE_EVENT_TRACER=ON \ -DEXECUTORCH_BUILD_COREML=ON \ -Dprotobuf_BUILD_TESTS=OFF \ @@ -52,7 +52,7 @@ main() { else cmake -DCMAKE_INSTALL_PREFIX=cmake-out \ -DCMAKE_BUILD_TYPE=Release \ - -DEXECUTORCH_BUILD_SDK=ON \ + -DEXECUTORCH_BUILD_DEVTOOLS=ON \ -DEXECUTORCH_ENABLE_EVENT_TRACER=ON \ -Bcmake-out . fi diff --git a/examples/devtools/test_example_runner.sh b/examples/devtools/test_example_runner.sh index a7309163a03..9c9ed782cbe 100644 --- a/examples/devtools/test_example_runner.sh +++ b/examples/devtools/test_example_runner.sh @@ -20,7 +20,7 @@ cmake_install_executorch_devtools_lib() { retry cmake -DCMAKE_INSTALL_PREFIX=cmake-out \ -DCMAKE_BUILD_TYPE=Release \ - -DEXECUTORCH_BUILD_SDK=ON \ + -DEXECUTORCH_BUILD_DEVTOOLS=ON \ -DEXECUTORCH_ENABLE_EVENT_TRACER=ON \ -DPYTHON_EXECUTABLE="$PYTHON_EXECUTABLE" \ -Bcmake-out . diff --git a/kernels/README.md b/kernels/README.md index 026778cc287..68b0ce222b3 100644 --- a/kernels/README.md +++ b/kernels/README.md @@ -356,7 +356,7 @@ cmake . \ -DEXECUTORCH_BUILD_EXTENSION_DATA_LOADER=ON \ -DEXECUTORCH_BUILD_EXTENSION_MODULE=ON \ -DEXECUTORCH_BUILD_EXTENSION_TENSOR=ON \ - -DEXECUTORCH_BUILD_SDK=ON \ + -DEXECUTORCH_BUILD_DEVTOOLS=ON \ -DEXECUTORCH_BUILD_VULKAN=OFF \ -DEXECUTORCH_BUILD_XNNPACK=ON \ -Bcmake-out diff --git a/runtime/core/targets.bzl b/runtime/core/targets.bzl index 4978e73169a..7e0aeb5d28c 100644 --- a/runtime/core/targets.bzl +++ b/runtime/core/targets.bzl @@ -15,7 +15,7 @@ def build_sdk(): def get_sdk_flags(): sdk_flags = [] if build_sdk(): - sdk_flags += ["-DEXECUTORCH_BUILD_SDK"] + sdk_flags += ["-DEXECUTORCH_BUILD_DEVTOOLS"] return sdk_flags def define_common_targets(): diff --git a/test/run_oss_cpp_tests.sh b/test/run_oss_cpp_tests.sh index 078196bfc1e..e771fd4b12e 100755 --- a/test/run_oss_cpp_tests.sh +++ b/test/run_oss_cpp_tests.sh @@ -36,7 +36,7 @@ build_executorch() { -DEXECUTORCH_BUILD_EXTENSION_MODULE=ON \ -DEXECUTORCH_BUILD_EXTENSION_RUNNER_UTIL=ON \ -DEXECUTORCH_BUILD_EXTENSION_TENSOR=ON \ - -DEXECUTORCH_BUILD_SDK=ON \ + -DEXECUTORCH_BUILD_DEVTOOLS=ON \ -DEXECUTORCH_BUILD_VULKAN=$BUILD_VULKAN \ -DEXECUTORCH_BUILD_XNNPACK=ON \ -Bcmake-out