Skip to content

Commit 3521021

Browse files
kirklandsignfacebook-github-bot
authored andcommitted
Fix OSS CI macos test-custom-ops-macos (#4170)
Summary: Pull Request resolved: #4170 Reviewed By: cccclai Differential Revision: D59496834 Pulled By: kirklandsign fbshipit-source-id: d9b8e25e0e673845ea61f872abc3940b3065c48a
1 parent d948c1a commit 3521021

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ endif()
553553
# Install `executorch` library as well as `executorch-config.cmake` under
554554
# ${CMAKE_INSTALL_PREFIX}/
555555
install(
556-
TARGETS executorch executorch_no_prim_ops
556+
TARGETS executorch executorch_no_prim_ops executorch_no_prim_ops_shared
557557
DESTINATION lib
558558
INCLUDES
559559
DESTINATION ${_common_include_directories}

build/executorch-config.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
cmake_minimum_required(VERSION 3.19)
1414

1515
set(_root "${CMAKE_CURRENT_LIST_DIR}/../..")
16-
set(required_lib_list executorch executorch_no_prim_ops portable_kernels)
16+
set(required_lib_list executorch executorch_no_prim_ops
17+
executorch_no_prim_ops_shared portable_kernels
18+
)
1719
foreach(lib ${required_lib_list})
1820
set(lib_var "LIB_${lib}")
1921
add_library(${lib} STATIC IMPORTED)

examples/portable/custom_ops/test_custom_ops.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ test_cmake_custom_op_2() {
103103

104104
EXT=$(get_shared_lib_ext)
105105
echo "Exporting ${model_name}.pte"
106-
${PYTHON_EXECUTABLE} -m "examples.portable.custom_ops.${model_name}" --so_library="cmake-out/examples/portable/custom_ops/libcustom_ops_aot_lib$EXT"
106+
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"
107107
# should save file custom_ops_2.pte
108108

109109
echo 'Running custom_ops_executor_runner'

0 commit comments

Comments
 (0)