Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

NNPACK can't be compiled at 1.1.0 1.2.0 and master branch #10579

Open
hongtao12310 opened this issue Apr 17, 2018 · 9 comments
Open

NNPACK can't be compiled at 1.1.0 1.2.0 and master branch #10579

hongtao12310 opened this issue Apr 17, 2018 · 9 comments
Labels

Comments

@hongtao12310
Copy link

I am trying to enable NNPACK to accelerate the cnn network. and I set USE_NNPACK=1 in config.mk and run make (before that I have compiled the nnpack repository and also set the CFLAGS and LDFLAGS)

but there are some troubles when compile the nnpack_full_connected-ini.h. sounds like the FullyConnectedOp class was not implemented. below is the error log

the FullyConnectedOp class was exists in the v1.0.0 branch. I am not sure if i miss something or there is some mistake when merge code to the new branch ?

In file included from src/operator/nn/fully_connected.cc:25:
In file included from src/operator/nn/./fully_connected-inl.h:37:
In file included from src/operator/nn/../linalg.h:31:
src/operator/nn/.././c_lapack_api.h:328:11: warning: Warning: lapack usage not enabled, linalg-operators will not be available. Ensure that
lapack library is installed and build with USE_LAPACK=1 to get lapack functionalities. [-W#pragma-messages]
#pragma message("Warning: lapack usage not enabled, linalg-operators will not be available."
^
In file included from src/operator/nn/fully_connected.cc:29:
src/operator/nn/../nnpack/nnpack_fully_connected-inl.h:45:39: error: unknown template name 'FullyConnectedOp'
class NNPACKFullyConnectedOp : public FullyConnectedOp<xpu, DType> {
^
src/operator/nn/../nnpack/nnpack_fully_connected-inl.h:51:25: error: expected '(' or '{'
: FullyConnectedOp<xpu, DType>(p) {
^
1 warning and 2 errors generated.
make: *** [build/src/operator/nn/fully_connected.o] Error 1

@zheng-da
Copy link
Contributor

do you want to try MKLDNN instead? it's in 1.2 and the master branch. It's way faster than NNPack and accelerates many more operators. it's also open-source. I wonder if we still need to use NNPACK.

@hongtao12310
Copy link
Author

yes i am also trying MKLDNN

but the master branch can't be linked due to lack NNPACK related library although i set the USE_NNPACK to 0

ld: warning: option -noall_load is obsolete and being ignored
Undefined symbols for architecture x86_64:
"_nnp_deinitialize", referenced from:
mxnet::op::NNPACKInitialize::~NNPACKInitialize() in nnpack_util.o
"_nnp_initialize", referenced from:
mxnet::op::NNPACKInitialize::NNPACKInitialize() in nnpack_util.o
"_pthreadpool_create", referenced from:
mxnet::op::NNPACKInitialize::NNPACKInitialize() in nnpack_util.o
"_pthreadpool_destroy", referenced from:
mxnet::op::NNPACKInitialize::~NNPACKInitialize() in nnpack_util.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [lib/libmxnet.so] Error 1

@hongtao12310
Copy link
Author

sounds like i made the mistake, please ignore it

@rajanksin
Copy link
Contributor

@hongtao12310 : Do you have answers for your problem. IF yes, please go ahead and close this issue. Thanks

@zheng-da : Can you please tag this as : Build.

@hongtao12310
Copy link
Author

mkldnn can be built. but nnpack was still can't be built , i reviewed the code, sounds like there are some includes issue and class not defined issue( such as FullyConnectedOp) for the nnpack part

@fullfanta
Copy link
Contributor

@hongtao12310
I also have same problem. I think this is due to #9677 which removed FullyConnectedOp.
In my opinion, src/operator/nnpack/nnpack_fully_connected-inl.h should be updated according to src/operator/nn/fully_connected-inl.h

@fullfanta
Copy link
Contributor

@hongtao12310
I found someone is working on it. #9860

@nswamy nswamy added the Build label Apr 30, 2018
@hongtao12310
Copy link
Author

agree @fullfanta

Let's wait for the fix

@mariussoutier
Copy link

So, consensus is to go USE_NNPACK = 0 and USE_MKLDNN = 1?

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

No branches or pull requests

6 participants