When compiling the onnxruntime source code, an error is reported:
/home/zxq/cxx/onnxruntime/cmake/external/onnx-tensorrt/builtin_op_importers.cpp:766:12: error: ‘class nvinfer1::IDeconvolutionLayer’ has no member named ‘setDilationNd’
layer->setDilationNd(dilations);
^~~~~~~~~~~~~
/home/zxq/cxx/onnxruntime/cmake/external/onnx-tensorrt/builtin_op_importers.cpp: In function ‘onnx2trt::NodeImportResult onnx2trt::{anonymous}::importGemm(onnx2trt::IImporterContext*, const onnx::NodeProto&, std::vector<onnx2trt::TensorOrWeights>&)’:
/home/zxq/cxx/onnxruntime/cmake/external/onnx-tensorrt/builtin_op_importers.cpp:1250:18: error: ‘class nvinfer1::IShuffleLayer’ has no member named ‘setZeroIsPlaceholder’
squeeze->setZeroIsPlaceholder(false);
^~~~~~~~~~~~~~~~~~~~
/home/zxq/cxx/onnxruntime/cmake/external/onnx-tensorrt/builtin_op_importers.cpp: In function ‘onnx2trt::NodeImportResult onnx2trt::{anonymous}::importGRU(onnx2trt::IImporterContext*, const onnx::NodeProto&, std::vector<onnx2trt::TensorOrWeights>&)’:
/home/zxq/cxx/onnxruntime/cmake/external/onnx-tensorrt/builtin_op_importers.cpp:1536:20: error: ‘class nvinfer1::IShuffleLayer’ has no member named ‘setZeroIsPlaceholder’
unsqueeze->setZeroIsPlaceholder(false);
^~~~~~~~~~~~~~~~~~~~
/home/zxq/cxx/onnxruntime/cmake/external/onnx-tensorrt/builtin_op_importers.cpp: In function ‘onnx2trt::NodeImportResult onnx2trt::{anonymous}::importLSTM(onnx2trt::IImporterContext*, const onnx::NodeProto&, std::vector<onnx2trt::TensorOrWeights>&)’:
/home/zxq/cxx/onnxruntime/cmake/external/onnx-tensorrt/builtin_op_importers.cpp:2051:22: error: ‘class nvinfer1::IShuffleLayer’ has no member named ‘setZeroIsPlaceholder’
reshapeBias->setZeroIsPlaceholder(false);
^~~~~~~~~~~~~~~~~~~~
/home/zxq/cxx/onnxruntime/cmake/external/onnx-tensorrt/builtin_op_importers.cpp: In function ‘onnx2trt::NodeImportResult onnx2trt::{anonymous}::importRNN(onnx2trt::IImporterContext*, const onnx::NodeProto&, std::vector<onnx2trt::TensorOrWeights>&)’:
/home/zxq/cxx/onnxruntime/cmake/external/onnx-tensorrt/builtin_op_importers.cpp:3202:22: error: ‘class nvinfer1::IShuffleLayer’ has no member named ‘setZeroIsPlaceholder’
reshapeBias->setZeroIsPlaceholder(false);
^~~~~~~~~~~~~~~~~~~~
/home/zxq/cxx/onnxruntime/cmake/external/onnx-tensorrt/builtin_op_importers.cpp: In function ‘onnx2trt::NodeImportResult onnx2trt::{anonymous}::importTRT_Shuffle(onnx2trt::IImporterContext*, const onnx::NodeProto&, std::vector<onnx2trt::TensorOrWeights>&)’:
/home/zxq/cxx/onnxruntime/cmake/external/onnx-tensorrt/builtin_op_importers.cpp:4219:12: error: ‘class nvinfer1::IShuffleLayer’ has no member named ‘setZeroIsPlaceholder’
layer->setZeroIsPlaceholder(zeroIsPlaceholder);
^~~~~~~~~~~~~~~~~~~~
external/onnx-tensorrt/CMakeFiles/nvonnxparser_static.dir/build.make:103: recipe for target 'external/onnx-tensorrt/CMakeFiles/nvonnxparser_static.dir/builtin_op_importers.cpp.o' failed
make[2]: *** [external/onnx-tensorrt/CMakeFiles/nvonnxparser_static.dir/builtin_op_importers.cpp.o] Error 1
CMakeFiles/Makefile2:2581: recipe for target 'external/onnx-tensorrt/CMakeFiles/nvonnxparser_static.dir/all' failed
make[1]: *** [external/onnx-tensorrt/CMakeFiles/nvonnxparser_static.dir/all] Error 2
Makefile:165: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):
File "/home/zxq/cxx/onnxruntime/tools/ci_build/build.py", line 1986, in <module>
sys.exit(main())
File "/home/zxq/cxx/onnxruntime/tools/ci_build/build.py", line 1921, in main
build_targets(args, cmake_path, build_dir, configs, num_parallel_jobs, args.target)
File "/home/zxq/cxx/onnxruntime/tools/ci_build/build.py", line 1007, in build_targets
run_subprocess(cmd_args, env=env)
File "/home/zxq/cxx/onnxruntime/tools/ci_build/build.py", line 528, in run_subprocess
return run(*args, cwd=cwd, capture_stdout=capture_stdout, shell=shell, env=my_env)
File "/home/zxq/cxx/onnxruntime/tools/python/util/run.py", line 41, in run
completed_process = subprocess.run(
File "/home/zxq/anaconda3/lib/python3.8/subprocess.py", line 512, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/local/bin/cmake', '--build', '/home/zxq/cxx/onnxruntime/build/Linux/Release', '--config', 'Release']' returned non-zero exit status 2.
reason:
From the error message, we can see that it is related to the third-party package external/onnx tensorrt of oonnxruntime, and then we can see that
Onnx runtime – rel-1.7.2 is the third-party package onnx tensorrt. This package depends on tensorrt version 7.2.2, but I installed 7.0.0, which is too low.
The reason why I installed 7.0.0 is that I installed CUDA 10.0 before, and CUDA 10.0 supports tensorrt 7.0.0 at most.
terms of settlement:
(1) Download the appropriate version of onnxruntime again. The download is too slow and the time cost is too high.
(2) Update CUDA 11.0, CUDA 11.0 can support the latest tensorrt 7.2.3, re install CUDA and tensorrt reference tutorial.
div>
Read More:
- onnx.onnx_cpp2py_export.checker.ValidationError
- [Solved] Could not find a version that satisfies the requirement onnx (from onnx-graphsurgeon0.2.6)
- TypeError: object of type ‘builtin_function_or_method’ has no len()
- [Solved] ONNXImporter::handleNode DNN/ONNX和create layer “onnx::Gather_384“ of type “NonMaxSuppression“
- Vs configure tensorrt environment to use
- Error in compiling pcl1.9.1: “class vtkdatasetmapper” has no member named “immediatemode rendering off”
- django Class ‘xxx‘ has no ‘objects‘ member
- Remove M Characters “Control M” or “^M” or “CTRL M” Characters in a UNIX file
- Using onnx to deploy models in mmdetection
- AttributeError: module ‘onnxruntime‘ has no attribute ‘InferenceSession‘
- ERROR: ../tSafe/coreReadArchive.cpp (38) – Serialization Error in verifyHeader: 0 (Version tag does
- Python error prompt: typeerror: ‘builtin’_ function_ or_ method‘ object is not subscriptable
- [Solved] No serializer found for class org.hibernate.proxy.pojo.bytebuddy.ByteBuddyInterceptor and no propert
- AttributeError: module ‘onnxruntime‘ has no attribute ‘InferenceSession‘
- Python2 PicklingError: Can‘t pickle <type ‘instancemethod‘>: attribute lookup __builtin__.instanceme
- How to Use paho.mqtt.cpp
- ‘builtin_ function_ or_ Method ‘object is not subscriptable error
- Solve syntax error: unexpected end of file or /bin/bash^m: bad interpeneter: no match file or directory
- The computer can’t turn on ERROR: NO BOOT DISK HAS BEEN DETECTED OR THE DISK HAS FAILED
- cpickle.picklingerror can’t pickle type ‘module’ attribute lookup __builtin__.module failed