apache / mxnet

Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware Dataflow Dep Scheduler; for Python, R, Julia, Scala, Go, Javascript and more
https://mxnet.apache.org
Apache License 2.0
20.78k stars 6.79k forks source link

cmake failed cpp-package with USE_TENSORRT,IN ubuntu18.4+cuda10+tensorrt7 #17394

Open allenxcp opened 4 years ago

allenxcp commented 4 years ago

Description

(A clear and concise description of what the bug is.)

/home/xcp/3rdparty/test/incubator-mxnet/3rdparty/dmlc-core/cmake/build_config.h.in -> include/dmlc/build_config.h Found OpenMP_C: -fopenmp
Found OpenMP_CXX: -fopenmp
Autodetected CUDA architecture(s): 7.5 -- CUDA: Using the following NVCC architecture flags -gencode;arch=compute_75,code=sm_75 CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: ONNX_LIBRARY linked by target "im2rec" in directory /home/xcp/3rdparty/test/incubator-mxnet linked by target "mxnet" in directory /home/xcp/3rdparty/test/incubator-mxnet linked by target "mxnet_unit_tests" in directory /home/xcp/3rdparty/test/incubator-mxnet/tests linked by target "image-classification-predict" in directory /home/xcp/3rdparty/test/incubator-mxnet/example/image-classification/predict-cpp ONNX_PROTO_LIBRARY linked by target "im2rec" in directory /home/xcp/3rdparty/test/incubator-mxnet linked by target "mxnet" in directory /home/xcp/3rdparty/test/incubator-mxnet linked by target "mxnet_unit_tests" in directory /home/xcp/3rdparty/test/incubator-mxnet/tests linked by target "image-classification-predict" in directory /home/xcp/3rdparty/test/incubator-mxnet/example/image-classification/predict-cpp

Error Message

(Paste the complete error message. Please also include stack trace by setting environment variable DMLC_LOG_STACK_TRACE_DEPTH=10 before running your script.) CMAKE_CROSSCOMPILING FALSE CMAKE_HOST_SYSTEM_PROCESSOR x86_64 CMAKE_SYSTEM_PROCESSOR x86_64 CMAKE_SYSTEM_NAME Linux CMake version '3.16.2' using generator 'Unix Makefiles' Could not find CCache. Consider installing CCache to speed up compilation. Determining F16C support F16C enabled Using TensorRT Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found version "3.6.1") CMAKE_BUILD_TYPE is unset, defaulting to Release Found OpenMP_C: -fopenmp
Found OpenMP_CXX: -fopenmp
GPU support is disabled Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) Intel(R) VTune(TM) Amplifier JIT profiling disabled Could NOT find MKL (missing: MKL_INCLUDE_DIR MKL_RT_LIBRARY) Found OpenBLAS libraries: /usr/lib/x86_64-linux-gnu/libopenblas.so Found OpenBLAS include: /usr/include/x86_64-linux-gnu OpenCV 4.2.0 found (/usr/local/lib/cmake/opencv4) OpenCV_LIBS=opencv_core;opencv_highgui;opencv_imgproc;opencv_imgcodecs Cannot find llvm-lit. Please put llvm-lit in your PATH, set OPENMP_LLVM_LIT_EXECUTABLE to its full path, or point OPENMP_LLVM_TOOLS_DIR to its directory. CMake Warning at 3rdparty/openmp/cmake/OpenMPTesting.cmake:22 (message): The check targets will not be available! Call Stack (most recent call first): 3rdparty/openmp/cmake/OpenMPTesting.cmake:40 (find_standalone_test_dependencies) 3rdparty/openmp/CMakeLists.txt:49 (include)

LIBOMP: Operating System -- Linux LIBOMP: Target Architecture -- x86_64 LIBOMP: Build Type -- Release LIBOMP: Library Kind -- SHARED LIBOMP: Library Type -- normal LIBOMP: Fortran Modules -- OFF LIBOMP: Build -- 20140926 LIBOMP: Use Stats-gathering -- OFF LIBOMP: Use Debugger-support -- OFF LIBOMP: Use ITT notify -- ON LIBOMP: Use OMPT-support -- ON LIBOMP: Use OMPT-optional -- ON LIBOMP: Use Adaptive locks -- ON LIBOMP: Use quad precision -- ON LIBOMP: Use TSAN-support -- OFF LIBOMP: Use Hwloc library -- OFF check-libomp does nothing. check-ompt does nothing. check-openmp does nothing. USE_LAPACK is ON CMake Warning at 3rdparty/googletest/googletest/CMakeLists.txt:47 (project): VERSION keyword not followed by a value or was followed by a value that expanded to nothing.

/home/xcp/3rdparty/test/incubator-mxnet/3rdparty/dmlc-core/cmake/build_config.h.in -> include/dmlc/build_config.h Found OpenMP_C: -fopenmp
Found OpenMP_CXX: -fopenmp
Autodetected CUDA architecture(s): 7.5 -- CUDA: Using the following NVCC architecture flags -gencode;arch=compute_75,code=sm_75 CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: ONNX_LIBRARY linked by target "im2rec" in directory /home/xcp/3rdparty/test/incubator-mxnet linked by target "mxnet" in directory /home/xcp/3rdparty/test/incubator-mxnet linked by target "mxnet_unit_tests" in directory /home/xcp/3rdparty/test/incubator-mxnet/tests linked by target "image-classification-predict" in directory /home/xcp/3rdparty/test/incubator-mxnet/example/image-classification/predict-cpp ONNX_PROTO_LIBRARY linked by target "im2rec" in directory /home/xcp/3rdparty/test/incubator-mxnet linked by target "mxnet" in directory /home/xcp/3rdparty/test/incubator-mxnet linked by target "mxnet_unit_tests" in directory /home/xcp/3rdparty/test/incubator-mxnet/tests linked by target "image-classification-predict" in directory /home/xcp/3rdparty/test/incubator-mxnet/example/image-classification/predict-cpp

Configuring incomplete, errors occurred! See also "/home/xcp/3rdparty/test/incubator-mxnet/build/CMakeFiles/CMakeOutput.log". See also "/home/xcp/3rdparty/test/incubator-mxnet/build/CMakeFiles/CMakeError.log".

To Reproduce

(If you developed your own code, please provide a short script that reproduces the error. For existing examples, please provide link.)

Steps to reproduce

(Paste the commands you ran that produced the error.)

1. 2.

What have you tried to solve it?

  1. I use the commond " git clone --recurse https://github.com/apache/incubator-mxnet.git" but not used. some thing like this: (base) xcp@xcp:~/3rdparty/test$ git clone --recurse-submodules https://github.com/apache/incubator-mxnet.git 正克隆到 'incubator-mxnet'... remote: Enumerating objects: 110051, done. remote: Total 110051 (delta 0), reused 0 (delta 0), pack-reused 110051 接收对象中: 100% (110051/110051), 75.61 MiB | 273.00 KiB/s, 完成. 处理 delta 中: 100% (74742/74742), 完成. 子模组 '3rdparty/dlpack'(https://github.com/dmlc/dlpack)未对路径 '3rdparty/dlpack' 注册 子模组 '3rdparty/dmlc-core'(https://github.com/dmlc/dmlc-core.git)未对路径 '3rdparty/dmlc-core' 注册 子模组 '3rdparty/googletest'(https://github.com/google/googletest.git)未对路径 '3rdparty/googletest' 注册 子模组 '3rdparty/mkldnn'(https://github.com/intel/mkl-dnn.git)未对路径 '3rdparty/mkldnn' 注册 子模组 '3rdparty/nvidia_cub'(https://github.com/NVlabs/cub.git)未对路径 '3rdparty/nvidia_cub' 注册 子模组 '3rdparty/onnx-tensorrt'(https://github.com/onnx/onnx-tensorrt.git)未对路径 '3rdparty/onnx-tensorrt' 注册 子模组 '3rdparty/openmp'(https://github.com/llvm-mirror/openmp)未对路径 '3rdparty/openmp' 注册 子模组 '3rdparty/ps-lite'(https://github.com/dmlc/ps-lite)未对路径 '3rdparty/ps-lite' 注册 子模组 '3rdparty/tvm'(https://github.com/apache/incubator-tvm.git)未对路径 '3rdparty/tvm' 注册 正克隆到 '/home/xcp/3rdparty/test/incubator-mxnet/3rdparty/dlpack'...

  2. I also use " git submodule update --init --recursive"

Environment

We recommend using our script for collecting the diagnositc information. Run the following command and paste the outputs below:

curl --retry 10 -s https://raw.githubusercontent.com/dmlc/gluon-nlp/master/tools/diagnose.py | python

git version 2.17.1
cuda 10.0
cudnn 7
tensorrt 7

# paste outputs here
leezu commented 4 years ago

You need to provide the cmake command that you are running...

CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: ONNX_LIBRARY

allenxcp commented 4 years ago

@leezu the commond is "cmake -DUSE_CUDA=1 -DUSE_CUDA_PATH=/usr/local/cuda -DUSE_CUDNN=1 -DUSE_CPP_PACKAGE=1 -DUSE_TENSORRT=1 .. "

leezu commented 4 years ago

Could you provide information how you installed Tensorrt and ONNX and what other commands you ran.

Essentially I'm looking for a list of all steps to reproduce this issue given a Ubuntu 18.04 or DLAMI Ubuntu 18.04 system.

Thank you