Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kirklandsign committed Aug 2, 2024
1 parent 2aa9d29 commit 6ad6514
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 17 deletions.
6 changes: 1 addition & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,6 @@ if(EXECUTORCH_BUILD_PYBIND)
executorch
extension_data_loader
portable_ops_lib
quantized_ops_aot_lib
util
torch
)
Expand All @@ -701,7 +700,6 @@ if(EXECUTORCH_BUILD_PYBIND)

if(EXECUTORCH_BUILD_KERNELS_QUANTIZED)
target_link_options_shared_lib(quantized_ops_lib)
list(APPEND _dep_libs quantized_kernels quantized_ops_lib)
endif()

# compile options for pybind
Expand Down Expand Up @@ -757,16 +755,14 @@ if(EXECUTORCH_BUILD_PYBIND)
INSTALL_RPATH "@loader_path/../../../torch/lib"
BUILD_RPATH "@loader_path/../../"
INSTALL_RPATH "@loader_path/../../"
BUILD_RPATH "@loader_path/../../examples/models/llama2/custom_ops"
INSTALL_RPATH "@loader_path/../../examples/models/llama2/custom_ops"
)
else()
set_target_properties(
portable_lib
PROPERTIES # Assume that this library will be installed in
# `site-packages/executorch/extension/pybindings`, and that
# the custom_ops_aot_lib should be found with relative path.
BUILD_RPATH "$ORIGIN:$ORIGIN/../../examples/models/llama2/custom_ops"
BUILD_RPATH "$ORIGIN:$ORIGIN/../.."
)
endif()

Expand Down
2 changes: 1 addition & 1 deletion build/Codegen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ function(gen_custom_ops_aot_lib)

target_link_options_shared_lib(${GEN_LIB_NAME})
if(EXECUTORCH_BUILD_PYBIND AND APPLE)
target_link_libraries(${GEN_LIB_NAME} PRIVATE executorch_no_prim_ops_shared)
target_link_libraries(${GEN_LIB_NAME} PRIVATE executorch_no_prim_ops)
target_link_options(${GEN_LIB_NAME} PRIVATE -undefined dynamic_lookup)
else()
target_link_libraries(${GEN_LIB_NAME} PRIVATE executorch_no_prim_ops)
Expand Down
7 changes: 5 additions & 2 deletions build/packaging/post_build_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@

set -eux

rm -rf pip-out/
echo "This script is run after building ExecuTorch binaries"
# This script is run after building ExecuTorch binaries

# Rename pip-out directory, to avoid using shared libraries in pip-out during
# smoke test.
mv pip-out BACKUP-pip-out
10 changes: 1 addition & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,21 +573,13 @@ def get_ext_modules() -> List[Extension]:
# Install the prebuilt library for custom ops used in llama.
BuiltFile(
"examples/models/llama2/custom_ops/libcustom_ops_aot_lib.*",
"executorch/examples/models/llama2/custom_ops",
"executorch",
)
)
ext_modules.append(
# Install the prebuilt library for quantized ops required by custom ops.
BuiltFile(
"kernels/quantized/libquantized_ops_aot_lib.*",
# With "executorch/kernels/quantized" it produces a file instead of putting to that dir
"executorch/examples/models/llama2/custom_ops",
)
)
ext_modules.append(
# Install the prebuilt library required by quantized ops
BuiltFile(
"libexecutorch_no_prim_ops_shared.*",
"executorch",
)
)
Expand Down

0 comments on commit 6ad6514

Please sign in to comment.