0

I have installed caffe-ssd with OpenCV version 3.2.0, CUDA version 9.2.148 and CuDNN version 7.2.1.38.

These are my settings in Makefile.config

# cuDNN acceleration switch (uncomment to build with cuDNN).
USE_CUDNN := 1

# CPU-only switch (uncomment to build without GPU support).
# CPU_ONLY := 1

# Uncomment if you're using OpenCV 3
OPENCV_VERSION := 3

# We need to be able to find Python.h and numpy/arrayobject.h.
PYTHON_INCLUDE := /usr/include/python2.7 \
        /usr/local/lib/python2.7/dist-packages/numpy/core/include

# Uncomment to support layers written in Python (will link against    Python libs)
WITH_PYTHON_LAYER := 1

# Whatever else you find you need goes here.
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu/hdf5/serial/

All tests were passed.

[----------] Global test environment tear-down
[==========] 1266 tests from 168 test cases ran. (45001 ms total)
[  PASSED  ] 1266 tests.

Thereafter I follow this link for SSD. The LMDB creation works without a problem but when I run

python examples/ssd/ssd_pascal.py

I get the following error

I0820 14:16:29.089138 22429 caffe.cpp:217] Using GPUs 0
F0820 14:16:29.089301 22429 common.cpp:66] Cannot use GPU in CPU-only Caffe: check mode.
*** Check failure stack trace: ***
    @     0x7f97322a00cd  google::LogMessage::Fail()
    @     0x7f97322a1f33  google::LogMessage::SendToLog()
    @     0x7f973229fc28  google::LogMessage::Flush()
    @     0x7f97322a2999  google::LogMessageFatal::~LogMessageFatal()
    @     0x7f973284f8a0  caffe::Caffe::SetDevice()
    @     0x55b05fe50dcb  (unknown)
    @     0x55b05fe4c543  (unknown)
    @     0x7f9730ae3b97  __libc_start_main
    @     0x55b05fe4cffa  (unknown)
Aborted (core dumped)

I have an NVIDIA GeForce GTX 1080 Ti graphics card.

Mon Aug 20 14:26:48 2018       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 396.51                 Driver Version: 396.51                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 108...  Off  | 00000000:01:00.0 Off |                  N/A |
| 44%   37C    P8    19W / 250W |     18MiB / 11177MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1356      G   /usr/lib/xorg/Xorg                             9MiB |
|    0      1391      G   /usr/bin/gnome-shell                           6MiB |
+-----------------------------------------------------------------------------+

I've tried compiling a simple Cuda code with nvcc and run it without any problem. I'm able to import caffe without any issue.

I have checked this question and that's not my problem.

talonmies
  • 70,661
  • 34
  • 192
  • 269
Harsh Wardhan
  • 2,110
  • 10
  • 36
  • 51
  • 1
    is it possible that your `Makefile.config` is changed when you install SSD on top of caffe? can you run `make test` after installing SSD? – Shai Aug 20 '18 at 12:55
  • 1
    Seems you're right. But now I'm getting "error == cudaSuccess (7 vs. 0) too many resources requested for launch" – Harsh Wardhan Aug 21 '18 at 06:35
  • is it possible other processes are also using your GPU? – Shai Aug 21 '18 at 06:42
  • I have checked. No other process is running. I'm able to run the regular Caffe on the GPU without any problem. – Harsh Wardhan Aug 23 '18 at 14:00
  • Unless you've changed the default parameters, SSD by default uses VGG backbone with batch size of 10 images. Could you try to reduce the batch size? – rkellerm Aug 30 '18 at 08:53

1 Answers1

0

for the error error == cudaSuccess (7 vs. 0)

change from gpus = "0,1,2,3" to gpus = "0" in ssd_pascal.py and also check the path of cuda in CUDA_DIR in Makefile.config and update it with the proper path and version that is installed in your system.

and for error “Cannot use GPU in CPU-only Caffe” build the ssd again using make test command

Divyanshu
  • 91
  • 1
  • 3