Skip to content

Commit 1b42512

Browse files
authored
Fix the build broken of examples/llm_manual used in llm/getting-started.md (#12095)
Hi all, While I was following https://docs.pytorch.org/executorch/main/llm/getting-started , the cmake build was broken due to the following error: ``` CMake Error at third-party/executorch/tools/cmake/common/preset.cmake:122 (message): Use of 'EXECUTORCH_BUILD_EXTENSION_MODULE' requires 'EXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR' Call Stack (most recent call first): third-party/executorch/tools/cmake/preset/default.cmake:300 (check_required_options_on) third-party/executorch/CMakeLists.txt:87 (include) ``` It would be better to fix it. Thanks.
1 parent 5d2193f commit 1b42512

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

docs/source/llm/getting-started.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED True)
362362
option(EXECUTORCH_ENABLE_LOGGING "" ON)
363363
option(EXECUTORCH_BUILD_EXTENSION_DATA_LOADER "" ON)
364364
option(EXECUTORCH_BUILD_EXTENSION_MODULE "" ON)
365+
option(EXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR "" ON)
365366
option(EXECUTORCH_BUILD_EXTENSION_TENSOR "" ON)
366367
option(EXECUTORCH_BUILD_KERNELS_OPTIMIZED "" ON)
367368
@@ -517,6 +518,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED True)
517518
option(EXECUTORCH_ENABLE_LOGGING "" ON)
518519
option(EXECUTORCH_BUILD_EXTENSION_DATA_LOADER "" ON)
519520
option(EXECUTORCH_BUILD_EXTENSION_MODULE "" ON)
521+
option(EXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR "" ON)
520522
option(EXECUTORCH_BUILD_EXTENSION_TENSOR "" ON)
521523
option(EXECUTORCH_BUILD_KERNELS_OPTIMIZED "" ON)
522524
option(EXECUTORCH_BUILD_XNNPACK "" ON) # Build with Xnnpack backend

examples/llm_manual/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED True)
1313
# Set options for executorch build.
1414
option(EXECUTORCH_BUILD_EXTENSION_DATA_LOADER "" ON)
1515
option(EXECUTORCH_BUILD_EXTENSION_MODULE "" ON)
16+
option(EXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR "" ON)
1617
option(EXECUTORCH_BUILD_EXTENSION_TENSOR "" ON)
1718
option(EXECUTORCH_BUILD_KERNELS_OPTIMIZED "" ON)
1819
option(EXECUTORCH_BUILD_XNNPACK "" ON) # Build with Xnnpack backend

0 commit comments

Comments
 (0)