Open rafikg opened 6 years ago
hi@Gouiaa,l also encouter this problem,have you solved this trouble?
@Anikily Yes.You have to set correctly the CMAKE_PREFIX_PATH.
find the folder path that contains Caffe2Config.cmake (should be something like /share/cmake/caffe2/
) and add this line at the beginning of the CMakeLists.txt file.
set(CMAKE_PREFIX_PATH "path of the folder that contains Caffe2Config.cmake")
Thanks Gouiaa,I have solved this problem by set(Caffe2_DIR "/path/to/pytorch/torch/share/cmake/Caffe2/") and i think it is the right way to do. but i have some trouble new: mkdir -p build && cd build && cmake .. && make -j12 -- Caffe2: CUDA detected: 7.5 -- Caffe2: CUDA nvcc is: /usr/bin/nvcc -- Caffe2: CUDA toolkit directory: /usr -- Caffe2: Header version is: 7.5 -- Found cuDNN: v7.0.5 (include: /home/tensor/cuda/include, library: /home/tensor/cuda/lib64/libcudnn.so) -- Autodetected CUDA architecture(s): 6.1 -- Added CUDA NVCC flags for: -gencode;arch=compute_61,code=sm_61 -- 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 : 1.0.0 -- Caffe2 include path : /home/tensor/pytorch/torch/lib/include -- Caffe2 found CUDA : True -- CUDA version : 7.5 -- CuDNN version : 7.0.5 -- Configuring done -- Generating done -- Build files have been written to: /home/tensor/densepose/build make[1]: Entering directory '/home/tensor/densepose/build' make[2]: Entering directory '/home/tensor/densepose/build' make[3]: Entering directory '/home/tensor/densepose/build' make[3]: Entering directory '/home/tensor/densepose/build' [ 25%] Building NVCC (Device) object CMakeFiles/caffe2_detectron_custom_ops_gpu.dir/detectron/ops/caffe2_detectron_custom_ops_gpu_generated_zero_even_op.cu.o [ 25%] Building NVCC (Device) object CMakeFiles/caffe2_detectron_custom_ops_gpu.dir/detectron/ops/caffe2_detectron_custom_ops_gpu_generated_pool_points_interp.cu.o make[3]: Leaving directory '/home/tensor/densepose/build' make[3]: Entering directory '/home/tensor/densepose/build' [ 50%] Building CXX object CMakeFiles/caffe2_detectron_custom_ops.dir/detectron/ops/zero_even_op.cc.o [ 50%] Building CXX object CMakeFiles/caffe2_detectron_custom_ops.dir/detectron/ops/pool_points_interp.cc.o In file included from /home/tensor/densepose/detectron/ops/pool_points_interp.cc:10:0: /home/tensor/densepose/detectron/ops/pool_points_interp.h:13:33: fatal error: caffe2/core/context.h: No such file or directory In file included from /home/tensor/densepose/detectron/ops/zero_even_op.cc:9:0: /home/tensor/densepose/detectron/ops/zero_even_op.h:12:33: fatal error: caffe2/core/context.h: No such file or directory compilation terminated. compilation terminated. CMakeFiles/caffe2_detectron_custom_ops.dir/build.make:86: recipe for target 'CMakeFiles/caffe2_detectron_custom_ops.dir/detectron/ops/pool_points_interp.cc.o' failed make[3]: [CMakeFiles/caffe2_detectron_custom_ops.dir/detectron/ops/pool_points_interp.cc.o] Error 1 make[3]: Waiting for unfinished tasks.... CMakeFiles/caffe2_detectron_custom_ops.dir/build.make:62: recipe for target 'CMakeFiles/caffe2_detectron_custom_ops.dir/detectron/ops/zero_even_op.cc.o' failed make[3]: [CMakeFiles/caffe2_detectron_custom_ops.dir/detectron/ops/zero_even_op.cc.o] Error 1 make[3]: Leaving directory '/home/tensor/densepose/build' CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/caffe2_detectron_custom_ops.dir/all' failed make[2]: [CMakeFiles/caffe2_detectron_custom_ops.dir/all] Error 2 make[2]: *** Waiting for unfinished tasks.... nvcc fatal : Unsupported gpu architecture 'compute_61' nvcc fatal : Unsupported gpu architecture 'compute_61' CMake Error at caffe2_detectron_custom_ops_gpu_generated_pool_points_interp.cu.o.cmake:219 (message): Error generating /home/tensor/densepose/build/CMakeFiles/caffe2_detectron_custom_ops_gpu.dir/detectron/ops/./caffe2_detectron_custom_ops_gpu_generated_pool_points_interp.cu.o
CMake Error at caffe2_detectron_custom_ops_gpu_generated_zero_even_op.cu.o.cmake:219 (message): Error generating /home/tensor/densepose/build/CMakeFiles/caffe2_detectron_custom_ops_gpu.dir/detectron/ops/./caffe2_detectron_custom_ops_gpu_generated_zero_even_op.cu.o
CMakeFiles/caffe2_detectron_custom_ops_gpu.dir/build.make:63: recipe for target 'CMakeFiles/caffe2_detectron_custom_ops_gpu.dir/detectron/ops/caffe2_detectron_custom_ops_gpu_generated_zero_even_op.cu.o' failed make[3]: [CMakeFiles/caffe2_detectron_custom_ops_gpu.dir/detectron/ops/caffe2_detectron_custom_ops_gpu_generated_zero_even_op.cu.o] Error 1 make[3]: Waiting for unfinished tasks.... CMakeFiles/caffe2_detectron_custom_ops_gpu.dir/build.make:70: recipe for target 'CMakeFiles/caffe2_detectron_custom_ops_gpu.dir/detectron/ops/caffe2_detectron_custom_ops_gpu_generated_pool_points_interp.cu.o' failed make[3]: [CMakeFiles/caffe2_detectron_custom_ops_gpu.dir/detectron/ops/caffe2_detectron_custom_ops_gpu_generated_pool_points_interp.cu.o] Error 1 make[3]: Leaving directory '/home/tensor/densepose/build' CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/caffe2_detectron_custom_ops_gpu.dir/all' failed make[2]: [CMakeFiles/caffe2_detectron_custom_ops_gpu.dir/all] Error 2 make[2]: Leaving directory '/home/tensor/densepose/build' Makefile:127: recipe for target 'all' failed make[1]: [all] Error 2 make[1]: Leaving directory '/home/tensor/densepose/build' Makefile:13: recipe for target 'ops' failed make: [ops] Error 2
and about the problem: /home/tensor/densepose/detectron/ops/pool_points_interp.h:13:33: fatal error: caffe2/core/context.h: No such file or directory actually,i find the context.h in pytorch/caffe2/core/context.h,could this file not be found?
Hello, I am working under ubuntu 16.04 using your intalation manual. And i have trouble when i try to run:
Traceback (most recent call last): File "detectron/tests/test_spatial_narrow_as_op.py", line 60, in test_large_forward self._run_test(A, B) File "detectron/tests/test_spatial_narrow_as_op.py", line 31, in _run_test workspace.RunOperatorOnce(op) File "/home/gabriel/anaconda2/lib/python2.7/site-packages/caffe2/python/workspace.py", line 167, in RunOperatorOnce return C.run_operator_once(StringifyProto(operator)) RuntimeError: [enforce fail at context_gpu.h:171] . Encountered CUDA error: no kernel image is available for execution on the device Error from operator: input: "A" input: "B" output: "C" name: "" type: "SpatialNarrowAs" device_option { device_type: 1 cuda_gpu_id: 0 }
Traceback (most recent call last): File "detectron/tests/test_spatial_narrow_as_op.py", line 51, in test_small_forward_and_gradient self._run_test(A, B, check_grad=True) File "detectron/tests/test_spatial_narrow_as_op.py", line 31, in _run_test workspace.RunOperatorOnce(op) File "/home/gabriel/anaconda2/lib/python2.7/site-packages/caffe2/python/workspace.py", line 167, in RunOperatorOnce return C.run_operator_once(StringifyProto(operator)) RuntimeError: [enforce fail at context_gpu.h:171] . Encountered CUDA error: no kernel image is available for execution on the device Error from operator: input: "A" input: "B" output: "C" name: "" type: "SpatialNarrowAs" device_option { device_type: 1 cuda_gpu_id: 0 }
Ran 3 tests in 0.363s
FAILED (errors=2)
How can i fix this ? Please Help
I am working under ubuntu 18.04 using anaconda 3. I create a conda environment and I run correctly the test until the
make ops
command where I have a problem I setCMAKE_PREFIX_PATH=/xxx/yyy/anaconda3
**CMake Error at CMakeLists.txt:8 (find_package): By not providing "FindCaffe2.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Caffe2", but CMake did not find one.Could not find a package configuration file provided by "Caffe2" with any of the following names:
Add the installation prefix of "Caffe2" to CMAKE_PREFIX_PATH or set "Caffe2_DIR" to a directory containing one of the above files. If "Caffe2" provides a separate development package or SDK, be sure it has been installed.**