mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-05-09 18:55:55 +02:00
81d309de87
* gnu/packages/machine-learning.scm (python-pytorch): Update to 2.7.0. [source]: Add substitution for additional miniz.h include patterns. [arguments]: Add 'skip-nccl-call' phase to use system NCCL. * gnu/packages/patches/python-pytorch-fix-codegen-2.7.0.patch, gnu/packages/patches/python-pytorch-runpath-2.7.0.patch, gnu/packages/patches/python-pytorch-system-libraries-2.7.0.patch, gnu/packages/patches/python-pytorch-without-kineto-2.7.0.patch: New files. * gnu/local.mk (dist_patch_DATA): Add them. Signed-off-by: Ayan Das <bvits@riseup.net> Signed-off-by: Ludovic Courtès <ludo@gnu.org>
31 lines
1.4 KiB
Diff
31 lines
1.4 KiB
Diff
Libraries (such as 'libtorch_cpu.so') and executables (such as 'torch_shm_manager')
|
|
get installed, quite surprisingly, to 'lib/python3.8/site-packages/{bin,lib}'.
|
|
Make sure RUNPATH matches that.
|
|
|
|
diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake
|
|
index be45936a8..7b19e5359 100644
|
|
--- a/cmake/Dependencies.cmake
|
|
+++ b/cmake/Dependencies.cmake
|
|
@@ -4,7 +4,7 @@ if(APPLE)
|
|
set(CMAKE_MACOSX_RPATH ON)
|
|
set(_rpath_portable_origin "@loader_path")
|
|
else()
|
|
- set(_rpath_portable_origin $ORIGIN)
|
|
+ set(_rpath_portable_origin $ORIGIN/../lib)
|
|
endif(APPLE)
|
|
# Use separate rpaths during build and install phases
|
|
set(CMAKE_SKIP_BUILD_RPATH FALSE)
|
|
diff --git a/functorch/CMakeLists.txt b/functorch/CMakeLists.txt
|
|
index bdfa4bfe4..2a75e3825 100644
|
|
--- a/functorch/CMakeLists.txt
|
|
+++ b/functorch/CMakeLists.txt
|
|
@@ -26,7 +26,7 @@ target_link_libraries(${PROJECT_NAME} PRIVATE pybind::pybind11)
|
|
|
|
set_target_properties(${PROJECT_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY
|
|
${CMAKE_BINARY_DIR}/functorch)
|
|
-set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "${_rpath_portable_origin}/../torch/lib")
|
|
+set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "$ORIGIN/../torch/lib")
|
|
|
|
# Copy-pasted prefix/suffix logic for Python extensions from
|
|
# https://github.com/pytorch/pytorch/blob/33bb8ae350611760139457b85842b1d7edf9aa11/caffe2/CMakeLists.txt#L1975
|