Skip to content

Commit 327e1d3

Browse files
authored
Revert "Lora example (#52)"
This reverts commit 5786f3f.
1 parent 5786f3f commit 327e1d3

File tree

8 files changed

+15
-371
lines changed

8 files changed

+15
-371
lines changed

program-data-separation/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,5 @@ To enable LoRA, we generate:
2727

2828
Multiple LoRA-adapted PTE files can share the same foundation weights and adding a model adapted to a new task incurs minimal binary size and runtime memory overhead.
2929

30-
Please take a look at [program-data-separation/cpp/lora_example](lora_example/) for a demo of the program-data separation APIs with LoRA. This example generates and runs a LoRA and a non-LoRA model that share foundation weights. At runtime, we see that memory usage does not double.
31-
3230
### Requirements
3331
LoRA is currently supported on executorch main. [Please install ExecuTorch pip package from source](https://docs.pytorch.org/executorch/stable/using-executorch-building-from-source.html#install-executorch-pip-package-from-source), until executorch==1.0 is released.

program-data-separation/cpp/CMakeLists.txt

Lines changed: 13 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -14,57 +14,30 @@ option(EXECUTORCH_BUILD_EXTENSION_TENSOR "" ON)
1414
option(EXECUTORCH_BUILD_KERNELS_OPTIMIZED "" ON)
1515
option(EXECUTORCH_BUILD_XNNPACK "" ON)
1616

17-
# Dependencies required for llm runner in lora demo.
18-
if(EXECUTORCH_BUILD_LORA_DEMO)
19-
option(EXECUTORCH_BUILD_EXTENSION_LLM "" ON)
20-
option(EXECUTORCH_BUILD_EXTENSION_LLM_RUNNER "" ON)
21-
option(EXECUTORCH_BUILD_KERNELS_LLM "" ON)
22-
option(EXECUTORCH_BUILD_KERNELS_LLM_AOT "" ON)
23-
endif()
24-
25-
# Add ExecuTorch subdirectory, after setting options.
17+
# Add ExecuTorch subdirectory
2618
add_subdirectory("executorch")
2719

28-
set(LINK_LIBS executorch
29-
executorch::extensions
30-
xnnpack_backend
31-
# NOTE: xnnpack_backend has to go before
32-
# kernels otherwise it doesn't get registered.
33-
executorch::kernels
34-
gflags
35-
)
36-
37-
# Add sources and dependencies.
38-
set(DEMO_SOURCES "")
39-
if(EXECUTORCH_BUILD_LINEAR_DEMO)
40-
list(APPEND DEMO_SOURCES "linear_example/main.cpp")
41-
endif()
42-
if(EXECUTORCH_BUILD_LORA_DEMO)
43-
list(APPEND DEMO_SOURCES "lora_example/main.cpp")
44-
endif()
20+
set(DEMO_SOURCES linear_example/main.cpp)
4521

4622
# Create executable
4723
add_executable(executorch_program_data_separation ${DEMO_SOURCES})
4824

25+
# Include directories
26+
target_include_directories(executorch_program_data_separation PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
27+
4928
# Link libraries
5029
target_link_libraries(
5130
executorch_program_data_separation
52-
PRIVATE ${LINK_LIBS}
31+
PRIVATE executorch
32+
extension_module_static
33+
extension_flat_tensor
34+
extension_tensor
35+
xnnpack_backend
36+
portable_ops_lib
37+
portable_kernels
38+
gflags
5339
)
5440

55-
# Include directories for lora demo.
56-
if(EXECUTORCH_BUILD_LORA_DEMO)
57-
# Include directories
58-
target_include_directories(executorch_program_data_separation PRIVATE
59-
${CMAKE_CURRENT_SOURCE_DIR}
60-
${CMAKE_CURRENT_SOURCE_DIR}/executorch/extension/llm/tokenizers/include
61-
)
62-
target_link_libraries(
63-
executorch_program_data_separation
64-
PUBLIC tokenizers::tokenizers
65-
)
66-
endif()
67-
6841
# Set output directory
6942
set_target_properties(executorch_program_data_separation
7043
PROPERTIES
Submodule executorch updated 328 files

program-data-separation/cpp/linear_example/build_example.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ mkdir -p build
77
cd build
88

99
# Configure CMake
10-
cmake -DCMAKE_BUILD_TYPE=Release -DEXECUTORCH_BUILD_LINEAR_DEMO=True ../..
10+
cmake -DCMAKE_BUILD_TYPE=Release ../..
1111

1212
# Build the project
1313
cmake --build . -j$(nproc)

program-data-separation/cpp/lora_example/README.md

Lines changed: 0 additions & 130 deletions
This file was deleted.

program-data-separation/cpp/lora_example/build_example.sh

Lines changed: 0 additions & 15 deletions
This file was deleted.

program-data-separation/cpp/lora_example/main.cpp

Lines changed: 0 additions & 129 deletions
This file was deleted.

0 commit comments

Comments
 (0)