shouxieai / infer

A new tensorrt integrate. Easy to integrate many tasks
MIT License
387 stars 80 forks source link

infer推理yolov5报错 #17

Open QHdsj1 opened 1 year ago

QHdsj1 commented 1 year ago

TensorRT版本:8.2.3.0 转换命令:trtexec --onnx=weights/best.onnx --minShapes=images:1x3x640x640 --maxShapes=images:16x3x640x640 --optShapes=images:1x3x640x640 --saveEngine=./yolov5s.engine 报错: [infer.cu:393]: Infer 0x5598119488f0 [DynamicShape] [infer.cu:405]: Inputs: 1 [infer.cu:409]: 0.images : shape {-1x3x640x640} [infer.cu:412]: Outputs: 4 [infer.cu:416]: 0.520 : shape {-1x256x80x80} [infer.cu:416]: 1.552 : shape {-1x512x40x40} [infer.cu:416]: 2.584 : shape {-1x1024x20x20} [infer.cu:416]: 3.output : shape {-1x13x8400} [2023-06-14 16:44:42][warn][trt_infer.cpp:26]:NVInfer: TensorRT was linked against cuBLAS/cuBLAS LT 11.6.5 but loaded cuBLAS/cuBLAS LT 11.5.1 [2023-06-14 16:44:42][warn][trt_infer.cpp:26]:NVInfer: TensorRT was linked against cuBLAS/cuBLAS LT 11.6.5 but loaded cuBLAS/cuBLAS LT 11.5.1 [infer.cu:209]: NVInfer: 1: [reformat.cpp::executeCutensor::385] Error Code 1: CuTensor (Internal cuTensor permutate execute failed) [yolo.cu:597]: Failed to tensorRT forward. [infer.cu:209]: NVInfer: 1: [reformat.cpp::executeCutensor::385] Error Code 1: CuTensor (Internal cuTensor permutate execute failed) [yolo.cu:597]: Failed to tensorRT forward. [infer.cu:209]: NVInfer: 3: [executionContext.cpp::enqueueInternal::330] Error Code 3: API Usage Error (Parameter check failed at: runtime/api/executionContext.cpp::enqueueInternal::330, condition: bindings[x] != nullptr ) [yolo.cu:597]: Failed to tensorRT forward. [infer.cu:209]: NVInfer: 3: [executionContext.cpp::enqueueInternal::330] Error Code 3: API Usage Error (Parameter check failed at: runtime/api/executionContext.cpp::enqueueInternal::330, condition: bindings[x] != nullptr ) [yolo.cu:597]: Failed to tensorRT forward. [infer.cu:209]: NVInfer: 3: [executionContext.cpp::enqueueInternal::330] Error Code 3: API Usage Error (Parameter check failed at: runtime/api/executionContext.cpp::enqueueInternal::330, condition: bindings[x] != nullptr ) [yolo.cu:597]: Failed to tensorRT forward. [infer.cu:209]: NVInfer: 1: [reformat.cpp::executeCutensor::385] Error Code 1: CuTensor (Internal cuTensor permutate execute failed) [yolo.cu:597]: Failed to tensorRT forward. [infer.cu:209]: NVInfer: 1: [pointWiseV2Helpers.h::launchPwgenKernel::546] Error Code 1: Cuda Driver (an illegal memory access was encountered) [yolo.cu:597]: Failed to tensorRT forward. [yolo.cu:503]: CUDA Runtime error💥 cudaMemcpyAsync(image_device, image_host, sizeimage, cudaMemcpyHostToDevice, stream) # an illegal memory access was encountered, code = cudaErrorIllegalAddress [ 700 ] 已放弃 (核心已转储)

bo-scnu commented 1 year ago

If you are using version 6.1 of YOLOv5, you should expect 1 output instead of 4. To reflect this change, please modify the Detect class in yolo.py.

LINTAO5835 commented 11 months ago

如果您使用的是 YOLOv6 版本 1.5,则应该有 1 个输出而不是 4 个输出。若要反映此更改,请修改 yolo.py 中的 Detect 类。

I also have this problem, how should I modify it

LINTAO5835 commented 11 months ago

Have you solved it?I modified detect on Yolov8 to cause this problem