tensorrtx icon indicating copy to clipboard operation
tensorrtx copied to clipboard

Segmentation fault when generate engine

Open Smartog opened this issue 1 year ago • 2 comments

Env

  • GPU 3090
  • OS Ubuntu20.04
  • CUDA 11.1
  • CUDNN 8.1.1
  • TensorRT 8.0

I have tried tensorrtx for both yolov5v7.0 and yolov5v6.0 ,and generated the yolov5s.wts as guided.

Bug as follows when i tried to generate yolov5s.engine

sudo ./yolov5 -s yolov5s.wts yolov5s.engine s Loading weights: yolov5s.wts Building engine, please wait for a while... [12/18/2023-13:53:04] [W] [TRT] TensorRT was linked against cuBLAS/cuBLAS LT 11.5.1 but loaded cuBLAS/cuBLAS LT 11.4.1 [12/18/2023-13:53:05] [W] [TRT] TensorRT was linked against cuDNN 8.2.1 but loaded cuDNN 8.1.1 [12/18/2023-13:53:05] [W] [TRT] Detected invalid timing cache, setup a local cache instead Segmentation fault

(I succeeded before on the same machine,I dont know why i failed this time)

Smartog avatar Dec 18 '23 05:12 Smartog

最后定位到src文件夹下的model.cpp文件build_det_engine函数中的 builder->buildEngineWithConfig执行不通过,请问大佬知道什么原因吗 std::cout << "Building engine, please wait for a while..." << std::endl; ICudaEngine* engine = builder->buildEngineWithConfig(*network, *config); std::cout << "Build engine successfully!" << std::endl;

Smartog avatar Dec 18 '23 06:12 Smartog

The CUDA environment seems not right, TRT is built on 11.5, but it's loading 11.4, and you said your CUDA is 11.1...

wang-xinyu avatar Dec 22 '23 02:12 wang-xinyu