Skip to content

Commit

Permalink
Fix OSS CI macos test-custom-ops-macos (#4170)
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: #4170

Reviewed By: cccclai

Differential Revision: D59496834

Pulled By: kirklandsign

fbshipit-source-id: d9b8e25e0e673845ea61f872abc3940b3065c48a
  • Loading branch information
kirklandsign authored and facebook-github-bot committed Jul 9, 2024
1 parent d948c1a commit 3521021
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
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"
# should save file custom_ops_2.pte

echo 'Running custom_ops_executor_runner'
Expand Down

0 comments on commit 3521021

Please sign in to comment.