Skip to content

Commit 9ac709c

Browse files
committed
[CMake] Add preset for building executor_runner with profiling
ghstack-source-id: c74d859 ghstack-comment-id: 3097983009 Pull Request resolved: #12682
1 parent 4456407 commit 9ac709c

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
@@ -99,6 +99,26 @@
9999
"list": ["Darwin", "Linux", "Windows"]
100100
}
101101
},
102+
{
103+
"name": "profiling",
104+
"displayName": "Build ExecuTorch with Profiling Enabled",
105+
"inherits": [
106+
"common"
107+
],
108+
"cacheVariables": {
109+
"EXECUTORCH_BUILD_PRESET_FILE": "${sourceDir}/tools/cmake/preset/profiling.cmake",
110+
"CMAKE_OSX_DEPLOYMENT_TARGET": "12.0"
111+
},
112+
"condition": {
113+
"type": "inList",
114+
"string": "${hostSystemName}",
115+
"list": [
116+
"Darwin",
117+
"Linux",
118+
"Windows"
119+
]
120+
}
121+
},
102122
{
103123
"name": "zephyr",
104124
"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)