-
Notifications
You must be signed in to change notification settings - Fork 186
Compile some custom ops: math.h:19:22: fatal error: Eigen/Core: No such file or directory #3
Comments
Can you try copying affine_channel_nd* files to caffe2/modules/detectron folder, re-building caffe2 and then running this code? |
@rohitgirdhar |
I tried the rebuilding caffe2 step already. Still not working... "In case this does not work, an alternative is to copy over the lib/ops/affine_channel_nd_op.* files into the caffe2 detectron module folder (caffe2/modules/detectron/), and recompiling caffe2. This would also make this additional op available to caffe2." (dl4cvcaffepy27) ubuntu@ip-172-31-0-76:~/pytorch$ find modules -name affine (dl4cvcaffepy27) ubuntu@ip-172-31-0-76:~/DetectAndTrack/lib$ make && make ops |
@kaisark I modify the line |
@zhujiagang Thanks. I moved on to the FB Densepose project but thought I would come back and get this to work. I fully qualified path to Eigen to get around the /usr/local/include/caffe2/utils/math.h compile error. #include "/home/ubuntu/pytorch/third_party/eigen/Eigen/Core" Now I am running into an nvcc related compile error: (dl4cvcaffepy27) ubuntu@ip-172-31-0-76:~/DetectAndTrack/lib$ make && make ops CMakeFiles/caffe2_detectron_custom_ops_gpu.dir/build.make:70: recipe for target 'CMakeFiles/caffe2_detectron_custom_ops_gpu.dir/ops/caffe2_detectron_custom_ops_gpu_generated_zero_even_op.cu.o' failed (dl4cvcaffepy27) ubuntu@ip-172-31-0-76:~/DetectAndTrack/lib$ make VERBOSE=1 CMakeFiles/caffe2_detectron_custom_ops_gpu.dir/build.make:70: recipe for target 'CMakeFiles/caffe2_detectron_custom_ops_gpu.dir/ops/caffe2_detectron_custom_ops_gpu_generated_zero_even_op.cu.o' failed |
I edited cmake/Cuda.cmake and commented out the following line which seemed to solve the issue: ###list(APPEND CUDA_NVCC_FLAGS "-std=c++11") (dl4cvcaffepy27) ubuntu@ip-172-31-0-76:~/DetectAndTrack/lib$ make clean |
I downloaded the pretrained models and ran the test_on_single_video.py script. 2D Code seems to work though the results for the head/face seem a little off to me as compared to CMU openface project (might be an issue with the pretrained model). python tools/test_on_single_video.py --cfg configs/video/2d_best/01_R101_best_hungarian-4GPU.yaml --video path/to/video/walkermovie.mp4 --output path/to/output/tracks_and_visualizations TEST.WEIGHTS pretrained_models/configs/video/2d_best/01_R101_best_hungarian-4GPU.yaml/model_final.pkl |
i don't have detectron module in caffe2 folder. caffe2 is installed through pytorch and installation is proper. but i don't have detectron module in caffe2 folder. |
I have built caffe2 and detectron on GPU (Ubuntu 16 - AWS EC2) and both are working. I am trying to build DetectandTrack, but I am running into an affine_channel_nd_op.* compile error (see below). Caffe2 build was able to find Eigen (-- Found system Eigen at /usr/include/eigen3). What do you think is the issue here? Path Include?
(dl4cvcaffepy27) ubuntu@ip-172-31-0-76:~$ echo $LD_LIBRARY_PATH
/usr/include/eigen3:/usr/local/lib:/home/ubuntu/torch/install/lib:/usr/local/cuda/lib64:/usr/local/cuda-8.0/lib64
I also see eigen (cmake) under /usr/lib
(dl4cvcaffepy27) ubuntu@ip-172-31-0-76:/usr/lib$ find . -name eig*
./python2.7/dist-packages/scipy/sparse/linalg/eigen
./cmake/eigen3
(dl4cvcaffepy27) ubuntu@ip-172-31-0-76:/usr/lib$ cd cmake/eigen3/
(dl4cvcaffepy27) ubuntu@ip-172-31-0-76:/usr/lib/cmake/eigen3$ ll
total 16
drwxr-xr-x 2 root root 4096 Nov 17 04:06 ./
drwxr-xr-x 3 root root 4096 Nov 17 04:06 ../
-rw-r--r-- 1 root root 1251 Jan 10 2016 Eigen3Config.cmake
-rw-r--r-- 1 root root 177 Dec 16 2015 UseEigen3.cmake
(dl4cvcaffepy27) ubuntu@ip-172-31-0-76:/usr/lib/cmake/eigen3$
ubuntu@ip-172-31-0-76:~/DetectAndTrack/lib$ cmake .
-- Caffe2: Cannot find gflags automatically. Using legacy find.
-- Caffe2: Found gflags (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libgflags.so)
-- Caffe2: Cannot find glog automatically. Using legacy find.
-- Caffe2: Found glog (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libglog.so)
-- Caffe2: Found protobuf with new-style protobuf targets.
-- Caffe2: Protobuf version 3.5.0
-- Caffe2: CUDA detected: 8.0
-- Found cuDNN: v7.1.2 (include: /usr/local/cuda/include, library: /usr/local/cuda/lib64/libcudnn.so)
-- Added CUDA NVCC flags for: sm_20 sm_21 sm_30 sm_35 sm_50 sm_52 sm_60 sm_61
-- CUDA detected: 8.0
-- Added CUDA NVCC flags for: sm_20 sm_21 sm_30 sm_35 sm_50 sm_52 sm_60 sm_61
-- Found libcuda: /usr/local/cuda/lib64/stubs/libcuda.so
-- Found libnvrtc: /usr/local/cuda/lib64/libnvrtc.so
-- Found cuDNN: v7.1.2 (include: /usr/local/cuda/include, library: /usr/local/cuda/lib64/libcudnn.so)
-- Summary:
-- CMake version : 3.5.1
-- CMake command : /usr/bin/cmake
-- System name : Linux
-- C++ compiler : /usr/bin/c++
-- C++ compiler version : 5.4.0
-- CXX flags : -std=c++11 -O2 -fPIC -Wno-narrowing
-- Caffe2 version : 0.8.2
-- Caffe2 include path : /usr/local/include
-- Have CUDA : TRUE
-- CUDA version : 8.0
-- CuDNN version : 7.1.2
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ubuntu/DetectAndTrack/lib
ubuntu@ip-172-31-0-76:~/DetectAndTrack/lib$ make
[ 12%] Building CXX object CMakeFiles/caffe2_detectron_custom_ops.dir/ops/affine_channel_nd_op.cc.o
In file included from /home/ubuntu/DetectAndTrack/lib/ops/affine_channel_nd_op.h:19:0,
from /home/ubuntu/DetectAndTrack/lib/ops/affine_channel_nd_op.cc:13:
/usr/local/include/caffe2/utils/math.h:19:22: fatal error: Eigen/Core: No such file or directory
compilation terminated.
CMakeFiles/caffe2_detectron_custom_ops.dir/build.make:62: recipe for target 'CMakeFiles/caffe2_detectron_custom_ops.dir/ops/affine_channel_nd_op.cc.o' failed
make[2]: *** [CMakeFiles/caffe2_detectron_custom_ops.dir/ops/affine_channel_nd_op.cc.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/caffe2_detectron_custom_ops.dir/all' failed
make[1]: *** [CMakeFiles/caffe2_detectron_custom_ops.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
ubuntu@ip-172-31-0-76:~/DetectAndTrack/lib$
The text was updated successfully, but these errors were encountered: