Skip to content

Commit f9796ea

Browse files
committed
[CMake] Add preset for building executor_runner with profiling
ghstack-source-id: 00bb8f1 ghstack-comment-id: 3097983009 Pull Request resolved: #12682
1 parent cea9b23 commit f9796ea

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

CMakePresets.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,26 @@
100100
"list": ["Darwin", "Linux", "Windows"]
101101
}
102102
},
103+
{
104+
"name": "profiling",
105+
"displayName": "Build ExecuTorch with Profiling Enabled",
106+
"inherits": [
107+
"common"
108+
],
109+
"cacheVariables": {
110+
"EXECUTORCH_BUILD_PRESET_FILE": "${sourceDir}/tools/cmake/preset/profiling.cmake",
111+
"CMAKE_OSX_DEPLOYMENT_TARGET": "12.0"
112+
},
113+
"condition": {
114+
"type": "inList",
115+
"string": "${hostSystemName}",
116+
"list": [
117+
"Darwin",
118+
"Linux",
119+
"Windows"
120+
]
121+
}
122+
},
103123
{
104124
"name": "zephyr",
105125
"displayName": "Build ExecuTorch for Zephyr RTOS",

tools/cmake/preset/profiling.cmake

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright (c) Meta Platforms, Inc. and affiliates.
2+
# All rights reserved.
3+
#
4+
# This source code is licensed under the BSD-style license found in the
5+
# LICENSE file in the root directory of this source tree.
6+
7+
# Presets to enable profiling in executor runner
8+
9+
set_overridable_option(EXECUTORCH_BUILD_EXTENSION_DATA_LOADER ON)
10+
set_overridable_option(EXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR ON)
11+
set_overridable_option(EXECUTORCH_BUILD_EXTENSION_MODULE ON)
12+
set_overridable_option(EXECUTORCH_BUILD_EXTENSION_TENSOR ON)
13+
set_overridable_option(EXECUTORCH_BUILD_KERNELS_LLM ON)
14+
set_overridable_option(EXECUTORCH_BUILD_KERNELS_OPTIMIZED ON)
15+
set_overridable_option(EXECUTORCH_BUILD_KERNELS_QUANTIZED ON)
16+
set_overridable_option(EXECUTORCH_BUILD_XNNPACK ON)
17+
set_overridable_option(EXECUTORCH_BUILD_DEVTOOLS ON)
18+
set_overridable_option(EXECUTORCH_BUILD_EXECUTOR_RUNNER ON)
19+
set_overridable_option(EXECUTORCH_ENABLE_EVENT_TRACER ON)

0 commit comments

Comments
 (0)