FS#62698 - [python-pytorch-cuda] libpytorch with provided cmake unusable
Attached to Project:
Community Packages
Opened by Xiangyu Zhu (c4r50nz) - Wednesday, 22 May 2019, 02:31 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Wednesday, 19 June 2019, 04:31 GMT
Opened by Xiangyu Zhu (c4r50nz) - Wednesday, 22 May 2019, 02:31 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Wednesday, 19 June 2019, 04:31 GMT
|
Details
Description:
When trying to link against libtorch with cmake, it errors about missing libc10_cuda during 'find_library(Torch REQUIRED)', which is caused by the incorrect Caffe2Targets.cmake's assumption of elf locations. I have reported this to pytorch's github page first: https://github.com/pytorch/pytorch/issues/20753 Additional info: * package verson: 1.0.1-8 * upstream: https://github.com/pytorch/pytorch/issues/20753 Steps to reproduce: install python-pytorch-cuda, make an example project with cmake: ``` cmake_minimum_required(VERSION 3.0 FATAL_ERROR) project(custom_ops) find_package(Torch REQUIRED) add_executable(test test.cc) # target_link_libraries(test "-L/usr/lib/pytorch -lc10 -lc10_cuda -lcaffe2 -lmklml_intel -ltorch -lshm -L/opt/cuda/targets/x86_64-linux/lib -lnvrtc -lcuda") target_link_libraries(test "${TORCH_LIBRARIES}") set_property(TARGET test PROPERTY CXX_STANDARD 11) ``` |
This task depends upon
Closed by Sven-Hendrik Haase (Svenstaro)
Wednesday, 19 June 2019, 04:31 GMT
Reason for closing: Fixed
Wednesday, 19 June 2019, 04:31 GMT
Reason for closing: Fixed
``ln -sr "${pkgdir}/ usr/lib/pytorch/"* "${pkgdir}/usr/lib/"`` in PKGBUILD.
Was there a reason for moving *.so files to /usr/lib/pytorch/?