Closed Arxemond777 closed 5 years ago
I performed cmake -DUSE_CUDA=1 -DUSE_CUDA_PATH=/usr/local/cuda-9.2 -DCUDA_VERSION=9.2 -DUSE_CUDNN=1 -DUSE_MKLDNN=1 -DUSE_CPP_PACKAGE=1 -GNinja .
with the CUDA_VERSION=9.2 key, but I still have error with running ninja -v
@Arxemond777 the USE_CPP_PACKAGE=1
is necessary only when building MXNet itself, this will generate your missing op.h
as for the missing architecture, I am not sure the architecture 61 is listed in the Makefile. I don't know why you are getting this error.
@lebeg what do you think of this? Is it CMAKE related?
@mxnet-label-bot Add [C++, Build]
@Arxemond777 with the steps you provided it seems that you are building first with make and then with cmake. You could try to stick to either of the options:
echo "USE_CPP_PACKAGE = 1" >> ./config.mk
This should generate you the mxnet/op.h
file.
@Arxemond777 with the steps you provided it seems that you are building first with make and then with cmake. You could try to stick to either of the options:
- Try to add a line before the make command:
echo "USE_CPP_PACKAGE = 1" >> ./config.mk
This should generate you the
mxnet/op.h
file.
- Or you the cmake command from the beginning and skip the make part.
Thanks. 1st item works for me.
At first I just add
echo "USE_CPP_PACKAGE = 1" >> ./config.mk
and tried make all
in ~/Downloads/incubator-mxnet/cpp-package/example/inference
and I had a such error
y.glushenkov@ml-dev-env:~/Downloads/incubator-mxnet/cpp-package/example/inference$ make -j 15 g++ -std=c++0x -I../../../3rdparty/tvm/nnvm/include -I../../../3rdparty/dmlc-core/include -I ../../include -I ../../../include -Wall -O3 -msse3 -funroll-loops -Wno-unused-parameter -Wno-unknown-pragmas -I ./ -o inception_inference inception_inference.cpp -L../../../lib -lmxnet
pkg-config --libs opencv
/usr/bin/ld: warning: libmklmlintel.so, needed by ../../../lib/libmxnet.so, not found (try using -rpath or -rpath-link) /usr/bin/ld: warning: libmkldnn.so.0, needed by ../../../lib/libmxnet.so, not found (try using -rpath or -rpath-link) ../../../lib/libmxnet.so: undefined reference to `lsame' ../../../lib/libmxnet.so: undefined reference tovslDeleteStream' ../../../lib/libmxnet.so: undefined reference to
mkldnn_primitive_desc_querypd' ../../../lib/libmxnet.so: undefined reference to `sdot' ../../../lib/libmxnet.so: undefined reference tocblas_dtrsm' ../../../lib/libmxnet.so: undefined reference to
mkldnn_lrn_backward_desc_init' ../../../lib/libmxnet.so: undefined reference tomkldnn_dilated_convolution_forward_desc_init' ../../../lib/libmxnet.so: undefined reference to
mkldnn_batch_normalization_backward_desc_init' ../../../lib/libmxnet.so: undefined reference tocblas_dgemm' ../../../lib/libmxnet.so: undefined reference to
mkldnn_eltwise_backward_descinit' ../../../lib/libmxnet.so: undefined reference to `dger' ../../../lib/libmxnet.so: undefined reference tosgesdd_' ../../../lib/libmxnet.so: undefined reference to
sgeqrf_' ../../../lib/libmxnet.so: undefined reference tomkldnn_primitive_desc_query_memory_d' ../../../lib/libmxnet.so: undefined reference to
mkldnn_pooling_backward_desc_init' ../../../lib/libmxnet.so: undefined reference tocblas_cgemm' ../../../lib/libmxnet.so: undefined reference to
vslSkipAheadStream' ../../../lib/libmxnet.so: undefined reference todsymv_' ../../../lib/libmxnet.so: undefined reference to
dpotri' ../../../lib/libmxnet.so: undefined reference to `scopy' ../../../lib/libmxnet.so: undefined reference tosger_' ../../../lib/libmxnet.so: undefined reference to
mkldnn_primitive_get_primitivedesc' ../../../lib/libmxnet.so: undefined reference to `xerbla' ../../../lib/libmxnet.so: undefined reference tomkldnn_reorder_primitive_desc_create_v2' ../../../lib/libmxnet.so: undefined reference to
ssyr2k' ../../../lib/libmxnet.so: undefined reference to `dgesv' ../../../lib/libmxnet.so: undefined reference tomkldnn_inner_product_forward_desc_init' ../../../lib/libmxnet.so: undefined reference to
mkldnn_batch_normalization_forward_desc_init' ../../../lib/libmxnet.so: undefined reference tocblas_dsyrk' ../../../lib/libmxnet.so: undefined reference to
mkldnn_sum_primitive_desc_create' ../../../lib/libmxnet.so: undefined reference tomkldnn_inner_product_backward_weights_desc_init' ../../../lib/libmxnet.so: undefined reference to
mkldnn_lrn_forward_descinit' ../../../lib/libmxnet.so: undefined reference to `ssymv' ../../../lib/libmxnet.so: undefined reference tomkldnn_engine_destroy' ../../../lib/libmxnet.so: undefined reference to
mkldnn_memory_primitive_desccreate' ../../../lib/libmxnet.so: undefined reference to `dcopy' ../../../lib/libmxnet.so: undefined reference tomkldnn_primitive_attr_create' ../../../lib/libmxnet.so: undefined reference to
mkldnn_inner_product_backward_data_desc_init' ../../../lib/libmxnet.so: undefined reference tomkldnn_primitive_attr_destroy' ../../../lib/libmxnet.so: undefined reference to
cblas_ssyrk' ../../../lib/libmxnet.so: undefined reference tomkldnn_primitive_desc_destroy' ../../../lib/libmxnet.so: undefined reference to
strmm' ../../../lib/libmxnet.so: undefined reference to `sgemm' ../../../lib/libmxnet.so: undefined reference tostrsm_' ../../../lib/libmxnet.so: undefined reference to
mkldnn_memory_descinit' ../../../lib/libmxnet.so: undefined reference to `dsyr2k' ../../../lib/libmxnet.so: undefined reference tomkldnn_dilated_convolution_backward_data_desc_init' ../../../lib/libmxnet.so: undefined reference to
mkldnn_pooling_forward_descinit' ../../../lib/libmxnet.so: undefined reference to `dsyr2' ../../../lib/libmxnet.so: undefined reference tomkldnn_convolution_backward_weights_desc_init' ../../../lib/libmxnet.so: undefined reference to
vslNewStream' ../../../lib/libmxnet.so: undefined reference todpotrf_' ../../../lib/libmxnet.so: undefined reference to
mkldnn_primitive_desc_query' ../../../lib/libmxnet.so: undefined reference tomkldnn_dilated_convolution_backward_weights_desc_init' ../../../lib/libmxnet.so: undefined reference to
dswap_' ../../../lib/libmxnet.so: undefined reference tomkldnn_stream_submit' ../../../lib/libmxnet.so: undefined reference to
mkldnn_memory_primitive_desc_get_size' ../../../lib/libmxnet.so: undefined reference tocblas_strsm' ../../../lib/libmxnet.so: undefined reference to
cblasdtrmm' ../../../lib/libmxnet.so: undefined reference to `daxpy' ../../../lib/libmxnet.so: undefined reference todgeqrf_' ../../../lib/libmxnet.so: undefined reference to
cblas_strmm' ../../../lib/libmxnet.so: undefined reference tomkldnn_eltwise_forward_desc_init' ../../../lib/libmxnet.so: undefined reference to
idamax' ../../../lib/libmxnet.so: undefined reference to `sposv' ../../../lib/libmxnet.so: undefined reference tocblas_sger' ../../../lib/libmxnet.so: undefined reference to
mkldnn_primitive_destroy' ../../../lib/libmxnet.so: undefined reference toviRngBernoulli' ../../../lib/libmxnet.so: undefined reference to
mkldnn_convolution_backward_data_desc_init' ../../../lib/libmxnet.so: undefined reference tomkldnn_reorder_primitive_desc_create' ../../../lib/libmxnet.so: undefined reference to
mkldnn_memory_set_datahandle' ../../../lib/libmxnet.so: undefined reference to `isamax' ../../../lib/libmxnet.so: undefined reference tomkldnn_engine_create' ../../../lib/libmxnet.so: undefined reference to
dtrmv_' ../../../lib/libmxnet.so: undefined reference tocblas_ddot' ../../../lib/libmxnet.so: undefined reference to
mkldnn_view_primitive_desc_create' ../../../lib/libmxnet.so: undefined reference tomkldnn_convolution_forward_desc_init' ../../../lib/libmxnet.so: undefined reference to
srot_' ../../../lib/libmxnet.so: undefined reference tomkldnn_primitive_attr_set_output_scales' ../../../lib/libmxnet.so: undefined reference to
dgemv_' ../../../lib/libmxnet.so: undefined reference tocblas_zgemm' ../../../lib/libmxnet.so: undefined reference to
mkldnn_primitive_attr_set_int_output_round_mode' ../../../lib/libmxnet.so: undefined reference tomkldnn_softmax_forward_desc_init' ../../../lib/libmxnet.so: undefined reference to
dscal' ../../../lib/libmxnet.so: undefined reference to `dnrm2' ../../../lib/libmxnet.so: undefined reference todgemm_' ../../../lib/libmxnet.so: undefined reference to
cblas_sgemm' ../../../lib/libmxnet.so: undefined reference tomkldnn_primitive_desc_create' ../../../lib/libmxnet.so: undefined reference to
sgesv_' ../../../lib/libmxnet.so: undefined reference tomkldnn_primitive_create' ../../../lib/libmxnet.so: undefined reference to
mkldnn_primitiveat' ../../../lib/libmxnet.so: undefined reference to `dtrsm' ../../../lib/libmxnet.so: undefined reference tomkldnn_concat_primitive_desc_create' ../../../lib/libmxnet.so: undefined reference to
dgetrf' ../../../lib/libmxnet.so: undefined reference to `sgetrf' ../../../lib/libmxnet.so: undefined reference todtrmm_' ../../../lib/libmxnet.so: undefined reference to
mkldnn_streamdestroy' ../../../lib/libmxnet.so: undefined reference to `spotrf' ../../../lib/libmxnet.so: undefined reference tomkldnn_primitive_get_output' ../../../lib/libmxnet.so: undefined reference to
mkldnn_primitive_descclone' ../../../lib/libmxnet.so: undefined reference to `dgesdd' ../../../lib/libmxnet.so: undefined reference tostrmv_' ../../../lib/libmxnet.so: undefined reference to
saxpy' ../../../lib/libmxnet.so: undefined reference to `spotri' ../../../lib/libmxnet.so: undefined reference tosgemv_' ../../../lib/libmxnet.so: undefined reference to
mkldnn_stream_create' ../../../lib/libmxnet.so: undefined reference tomkldnn_stream_wait' ../../../lib/libmxnet.so: undefined reference to
ddot' ../../../lib/libmxnet.so: undefined reference to `snrm2' ../../../lib/libmxnet.so: undefined reference todposv_' ../../../lib/libmxnet.so: undefined reference to
ssyr2_' ../../../lib/libmxnet.so: undefined reference tomkldnn_memory_get_data_handle' ../../../lib/libmxnet.so: undefined reference to
cblasdger' ../../../lib/libmxnet.so: undefined reference to `drot' ../../../lib/libmxnet.so: undefined reference tomkldnn_memory_primitive_desc_equal' ../../../lib/libmxnet.so: undefined reference to
sscal' ../../../lib/libmxnet.so: undefined reference to `sswap' ../../../lib/libmxnet.so: undefined reference to `cblas_sdot' collect2: error: ld returned 1 exit status Makefile:37: recipe for target 'inception_inference' failed make: *** [inception_inference] Error 1
but after it I run ninja -v
in ~/Downloads/incubator-mxnet/
and did again make -j 15
in ~/Downloads/incubator-mxnet/cpp-package/example
and example from ~/Downloads/incubator-mxnet/cpp-package/example/inference
started work after it.
This issue is reopen https://github.com/apache/incubator-mxnet/issues/9187 In this issue recommends use this tutorial https://mxnet.incubator.apache.org/versions/master/tutorials/c++/basics.html Copy libmxnet.so to my /path/to/mxnet. I did it. Also in this guide there is a such link "The generation should be done when building the C++ package."(https://mxnet.incubator.apache.org/versions/master/get_started/build_from_source.html#build-the-c++-package) this page has been deleted
Description
I performed following commands
cd cpp-package/example/ && make -j4 USE_CPP_PACKAGE=1
and it performed success.After it I performed following commands
cd cpp-package/inference && make -j4 USE_CPP_PACKAGE=1
and I got following errorsAlso I have an error while performing
ninja -v
(I described it below), I think it related with the question aboveEnvironment info (Required)
Package used (Python/R/Scala/Julia): C++
MXNet commit hash: (Paste the output of
git rev-parse HEAD
here.)Build config: (Paste the content of config.mk, or the build command.)
Error Message:
On the step
ninja -v
I got following errorunsupported gpu architecture 61
The full error log
Steps to reproduce