Skip to content

Fix OSS CI macos test-custom-ops-macos #4170

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ endif()
# Install `executorch` library as well as `executorch-config.cmake` under
# ${CMAKE_INSTALL_PREFIX}/
install(
TARGETS executorch executorch_no_prim_ops
TARGETS executorch executorch_no_prim_ops executorch_no_prim_ops_shared
DESTINATION lib
INCLUDES
DESTINATION ${_common_include_directories}
Expand Down
4 changes: 3 additions & 1 deletion build/executorch-config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
cmake_minimum_required(VERSION 3.19)

set(_root "${CMAKE_CURRENT_LIST_DIR}/../..")
set(required_lib_list executorch executorch_no_prim_ops portable_kernels)
set(required_lib_list executorch executorch_no_prim_ops
executorch_no_prim_ops_shared portable_kernels
)
foreach(lib ${required_lib_list})
set(lib_var "LIB_${lib}")
add_library(${lib} STATIC IMPORTED)
Expand Down
2 changes: 1 addition & 1 deletion examples/portable/custom_ops/test_custom_ops.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ test_cmake_custom_op_2() {

EXT=$(get_shared_lib_ext)
echo "Exporting ${model_name}.pte"
${PYTHON_EXECUTABLE} -m "examples.portable.custom_ops.${model_name}" --so_library="cmake-out/examples/portable/custom_ops/libcustom_ops_aot_lib$EXT"
DYLD_LIBRARY_PATH="cmake-out/lib" ${PYTHON_EXECUTABLE} -m "examples.portable.custom_ops.${model_name}" --so_library="cmake-out/examples/portable/custom_ops/libcustom_ops_aot_lib$EXT"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# should save file custom_ops_2.pte

echo 'Running custom_ops_executor_runner'
Expand Down
Loading