caffe2 icon indicating copy to clipboard operation
caffe2 copied to clipboard

No module named caffe2_pybind11_state_gpu

Open liliburnett opened this issue 9 years ago • 5 comments

When running the create_your_own_dataset.ipynb tutorial, I get this message: WARNING:root:This caffe2 python run does not have GPU support. Will run in CPU only mode. WARNING:root:Debug message: No module named caffe2_pybind11_state_gpu

I built with CUDA support.

I have caffe2_pybind11_state_gpu.so in /usr/local/caffe2/python/ /home/daenerys/caffe2/caffe2/CMakeFiles/CMakeRelink.dir/ /home/daenerys/caffe2/caffe2/python/

My path is set as follows: export LD_LIBRARY_PATH=/usr/local/lib:$CUDA_HOME/lib64:$LD_LIBRARY_PATH

export PYTHONPATH=/usr/local:$PYTHONPATH export PYTHONPATH=$PYTHONPATH:/home/daenerys/caffe2/caffe2

My installation gave me no build folder, probably because I used my own Makefile?

How do I correct this?

liliburnett avatar Apr 26 '17 05:04 liliburnett

@liliburnett you can run cmake -DUSE_CUDA=ON and re-install caffe2.

vingovan avatar Apr 26 '17 06:04 vingovan

You should be building with cmake, but it you add the folder with caffe2_pybind_state_gpu.so to your LD_LIBRARY_PATH then you should be ok

slayton58 avatar Apr 27 '17 19:04 slayton58

Thanks, @slayton58.

pietern avatar May 04 '17 17:05 pietern

I compiled and installed Caffe2 as described in documentation: make && cd build && sudo make install and test runs fine (python -m caffe2.python.operator_test.relu_op_test) However I see same error, when run from jupyter notebook. According to logs the library is built with CUDA support: -- USE_CUDA : ON But I don't see caffe2_pybind11_state_gpu.so file in the build folder only caffe2_pybind11_state.so is presented. Please re-open until this is resolved.

dimon777 avatar May 06 '17 05:05 dimon777

Ah. For windows, try:

C:\YourPath> set USE_CUDA=ON
C:\YourPath> build_windows.bat

rodmanlau avatar Jun 16 '17 21:06 rodmanlau