conv.cpp being used instead of conv.cu

17 views
Skip to first unread message

Jeremy Rutman

unread,
Aug 28, 2016, 11:24:04 AM8/28/16
to Caffe Users
hi
i am attempting to develop a layer and for my own understanding added some logging to the conv_layer.cpp and conv_layer.cu   files,
recompiled and got the following output which indicates gpu usage , but also use of the .cpp and not .cu file

root@377d090f8432:~/caffe# caffe train -solver examples/mnist/lenet_solver.prototxt  -gpu 3
I0828
14:52:32.846958 29065 caffe.cpp:217] Using GPUs 3
I0828
14:52:32.865934 29065 caffe.cpp:222] GPU 3: Tesla K80
....
I0828
14:51:48.314754 29058 conv_layer.cpp:14] hello, cpu conv compute output shape.  {this is from my LOG(INFO) line}


I was thinking that conv_layer.cpp would be used only by cpu runs and not gpu runs. maybe compute_output_shape is called cpu and then fwd/backwd is cpu/gpu specific.
But I also put similar log lines into the forward_gpu, backward_gpu, and forward_cpu and backward_cpu code  such as:

void ConvolutionLayer<Dtype>::Forward_cpu(const vector<Blob<Dtype>*>& bottom,
     
const vector<Blob<Dtype>*>& top) {
 
const Dtype* weight = this->blobs_[0]->cpu_data();
      LOG
(INFO) << "hello, cpu conv forward  !";

and these seem never to get called, or the LOG function is being suppressed somehow.

so  how do i get my log output not suppressed  (std::cout << "hi" ; doesn't seem to work) - or otherwise get std output from the fwd/back conv layer

Jeremy Rutman

unread,
Aug 28, 2016, 6:30:33 PM8/28/16
to Caffe Users
ok i get it now. there are further cudnn_conv files which are being used in my case
Reply all
Reply to author
Forward
0 new messages