Skip to content

Commit ab57a8d

Browse files
committed
Update
1 parent 7a61633 commit ab57a8d

File tree

2 files changed

+23
-17
lines changed

2 files changed

+23
-17
lines changed

CMakeLists.txt

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -879,22 +879,28 @@ if(EXECUTORCH_BUILD_PYBIND)
879879

880880
# Set RPATH to find PyTorch libraries relative to the installation location
881881
# This goes from executorch/extension/pybindings up to site-packages, then to
882-
# torch/lib
883-
# if(APPLE)
884-
# get_target_property(existing_rpath portable_lib INSTALL_RPATH)
885-
# string(FIND "${existing_rpath}" "@loader_path" pos)
886-
# if(pos EQUAL -1)
887-
# set_target_properties(
888-
# portable_lib PROPERTIES BUILD_RPATH "@loader_path/../../../torch/lib"
889-
# INSTALL_RPATH "@loader_path/../../../torch/lib"
890-
# )
891-
# endif()
892-
# else()
893-
# set_target_properties(
894-
# portable_lib PROPERTIES BUILD_RPATH "$ORIGIN/../../../torch/lib"
895-
# INSTALL_RPATH "$ORIGIN/../../../torch/lib"
896-
# )
897-
# endif()
882+
# torch/lib. Don't do this to APPLE, as it will error out on the following
883+
# error:
884+
#
885+
get_target_property(_rpath portable_lib INSTALL_RPATH)
886+
if(NOT _rpath)
887+
if(APPLE)
888+
set_target_properties(
889+
portable_lib PROPERTIES BUILD_RPATH "@loader_path/../../../torch/lib"
890+
INSTALL_RPATH "@loader_path/../../../torch/lib"
891+
)
892+
else()
893+
set_target_properties(
894+
portable_lib PROPERTIES BUILD_RPATH "$ORIGIN/../../../torch/lib"
895+
INSTALL_RPATH "$ORIGIN/../../../torch/lib"
896+
)
897+
endif()
898+
else()
899+
message(
900+
STATUS
901+
"Skipping setting RPATH for portable_lib on Apple platforms, found: ${_rpath}"
902+
)
903+
endif()
898904

899905
install(
900906
TARGETS portable_lib

torch_pin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
TORCH_VERSION = "2.10.0"
2-
NIGHTLY_VERSION = "dev20251012"
2+
NIGHTLY_VERSION = "dev20251015"

0 commit comments

Comments
 (0)