Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make -j8 error #8

Open
natasasdj opened this issue Aug 24, 2018 · 2 comments
Open

make -j8 error #8

natasasdj opened this issue Aug 24, 2018 · 2 comments

Comments

@natasasdj
Copy link

Makefile.config:
CPU_ONLY := 1

I am trying to build with CPU only. I don't want to train the model but I wanted just to make an inference and to look in more details in the dimensions of different variables in the model.
Is it possible to build your version of caffe with CPU_ONLY flag? I succeeded it with normal caffe.

Error obtained:
src/caffe/layers/argmax_layer.cpp:99:29: error: macro "STUB_GPU_FORWARD" requires 2 arguments, but only 1 given
STUB_GPU_FORWARD(ArgMaxLayer);
^
src/caffe/layers/argmax_layer.cpp:99:1: error: ‘STUB_GPU_FORWARD’ does not name a type
STUB_GPU_FORWARD(ArgMaxLayer);
^
Makefile:581: recipe for target '.build_release/src/caffe/layers/argmax_layer.o' failed
make: *** [.build_release/src/caffe/layers/argmax_layer.o] Error 1

@natasasdj natasasdj changed the title make caffe error make -j8 error Aug 24, 2018
@aBlueDragon
Copy link

This is a bug you may encounter if you want to compile with CPU only flag on.
The backward function for argmax layer was not implemented for CPU users, this is why the author use STUB_GPU_FORWARD to register the layer for CPU instead of STUB_GPU like other layers. However, the author may have forgotten to add necessary argument for the function.
Go to argmax_layer.cpp and simply change STUB_GPU_FORWARD(ArgMaxLayer); to STUB_GPU_FORWARD(ArgMaxLayer,Forward); should solve the issue.

@yezhengli-Mr9
Copy link

yezhengli-Mr9 commented Jan 7, 2021

STUB_GPU_FORWARD(ArgMaxLayer,Forward);

Thanks a lot and helps my issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants