Open altear opened 6 years ago
Others are having this issue https://github.com/pytorch/pytorch/issues/9489#issuecomment-421020215
Any update on this issue?
In my case, adding these two lines at the beginning of Detectron/CMakeLists.txt solved the problem. Please modify the /path/to/pytorch/
part.
set(Caffe2_DIR "/path/to/pytorch/torch/share/cmake/Caffe2/")
include_directories("/path/to/pytorch/torch/lib/include")
thank you @linkinpark213 it works
@linkinpark213 This worked for me as well! thanks!
Expected results
make ops
successfully buildsActual results
make ops
fails to build with the following errorWhen exporting the Caffe2 build dir
export Caffe2_DIR=/home/ubtuntu/pytorch/build/
The error isWhen exporting the Caffe2 cmake dir
export Caffe2_DIR=/home/ubtuntu/pytorch/cmake
The error isDetailed steps to reproduce
ThinkPad T440p GPU:
GeForce GT 730M
CPU:Intel(R) Core(TM) i5-4300M CPU @ 2.60GHz
OS
Update
Download the
.deb
files for CUDA 9.0, cuDNN 7.x, and NCCLInstall the deb files by running this
REBOOT
Test CUDA with
Test cuDNN with
Install Miniconda
Download and build PyTorch
Dependencies mentioned on PyTorch's gitpage
Dependencies mentioned on Caffe2's website
REBOOT
Clone git repository and build
Verify
Install COCO
Install Detectron
REBOOT
I've also tried adding the pytorch/build, pytorch/cmake, and pytorch/caffe2 paths to environment variables
Caffe2_DIR
andCMAKE_PREFIX_PATH
. As well as directly calling cmake passing in the same variables as-D
options, and directly modifying the cmake code to point to them.System information
PYTHONPATH
environment variable: /home/ubtuntu/pytorch/cmake/:/home/ubuntu/miniconda/python --version
output: Python 3.7.0make
builds successfully.