Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TensorRT10.2.0.19生成.engine报错 #1555

Open
buptxlsk opened this issue Jul 13, 2024 · 6 comments
Open

TensorRT10.2.0.19生成.engine报错 #1555

buptxlsk opened this issue Jul 13, 2024 · 6 comments

Comments

@buptxlsk
Copy link

Env

  • GPU, RTX3050
  • OS,Ubuntu22.04
  • Cuda 12.2
  • TensorRT 10.2.0.19

About this repo

  • detect
  • YoloV8

Your problem

/home/xlsk/Code/tensorrtx/yolov8/yolov8_det.cpp:109:20: error: ‘class nvinfer1::ICudaEngine’ has no member named ‘getNbBindings’
109 | assert(engine->getNbBindings() == 3);
| ^~~~~~~~~~~~~
/home/xlsk/Code/tensorrtx/yolov8/yolov8_det.cpp:112:36: error: ‘class nvinfer1::ICudaEngine’ has no member named ‘getBindingIndex’
112 | const int inputIndex = engine->getBindingIndex(kInputTensorName);
| ^~~~~~~~~~~~~~~
/home/xlsk/Code/tensorrtx/yolov8/yolov8_det.cpp:113:37: error: ‘class nvinfer1::ICudaEngine’ has no member named ‘getBindingIndex’
113 | const int outputIndex = engine->getBindingIndex(kOutputTensorName);
| ^~~~~~~~~~~~~~~
/home/xlsk/Code/tensorrtx/yolov8/yolov8_det.cpp:114:41: error: ‘class nvinfer1::ICudaEngine’ has no member named ‘getBindingIndex’
114 | const int outputIndex_seg = engine->getBindingIndex("proto");
| ^~~~~~~~~~~~~~~
/home/xlsk/Code/tensorrtx/yolov8/yolov8_det.cpp: In function ‘void infer(nvinfer1::IExecutionContext&, CUstream_st*&, void**, float*, float*, int, float*, float*, int, std::string)’:
/home/xlsk/Code/tensorrtx/yolov8/yolov8_det.cpp:143:13: error: ‘class nvinfer1::IExecutionContext’ has no member named ‘enqueue’; did you mean ‘enqueueV3’?
143 | context.enqueue(batchsize, buffers, stream, nullptr);
| ^~~~~~~
| enqueueV3
/home/xlsk/Code/tensorrtx/yolov8/yolov8_det.cpp: In function ‘int main(int, char**)’:
/home/xlsk/Code/tensorrtx/yolov8/yolov8_det.cpp:250:29: error: ‘class nvinfer1::ICudaEngine’ has no member named ‘getBindingDimensions’
250 | auto out_dims = engine->getBindingDimensions(1);
| ^~~~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/yolov8_det.dir/build.make:76:CMakeFiles/yolov8_det.dir/yolov8_det.cpp.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:117:CMakeFiles/yolov8_det.dir/all] 错误 2
make: *** [Makefile:91:all] 错误 2

@buptxlsk
Copy link
Author

请问是API接口更新问题吗?新人不太懂,谢谢。

@mpj1234
Copy link
Contributor

mpj1234 commented Jul 16, 2024

是的不支持,我已经提交了新的yolov8的tensorrt10支持的pr,可以查看 #1557, 或者等待合并到trt10分支

@xiangnameduoganshaya
Copy link

是的不支持,我已经提交了新的yolov8的tensorrt10支持的pr,可以查看 #1557, 或者等待合并到trt10分支

你好,我使用了你的代码,生成了可执行文件yolov8_det,但是在构建引擎时出现了这个错误,Loading weights: best.wts
Your platform support int8: true
Building engine, please wait for a while...
reading calib cache: int8calib.table
[09/20/2024-18:23:38] [W] [TRT] Heuristics has been ignored in this builder run. This feature is only supported on Ampere and beyond.
[09/20/2024-18:23:41] [E] [TRT] Unexpected exception _Map_base::at
Build engine successfully!
yolov8_det: /home/xqy/Downloads/tensorrtx-master/yolov8/yolov8_det.cpp:29: void serialize_engine(std::string&, std::string&, int&, std::string&, float&, float&, int&): Assertion `serialized_engine' failed.
Aborted
我不知道是serialize_engine这个函数的问题还是什么问题,希望您能指教一下,十分感谢。

@suojinhui
Copy link

engine->getBindingDimensions(1)这个函数已经没了,换成
m_inputDims = m_engine->getTensorShape(m_engine->getIOTensorName(0));
m_outputDims = m_engine->getTensorShape(m_engine->getIOTensorName(1));
类似的写法来获取输入输出的维度

@Q-wenny
Copy link

Q-wenny commented Nov 22, 2024

是的不支持,我已经提交了新的yolov8的tensorrt10支持的pr,可以查看 #1557, 或者等待合并到trt10分支

你好,我使用了你的代码,生成了可执行文件yolov8_det,但是在构建引擎时出现了这个错误,Loading weights: best.wts Your platform support int8: true Building engine, please wait for a while... reading calib cache: int8calib.table [09/20/2024-18:23:38] [W] [TRT] Heuristics has been ignored in this builder run. This feature is only supported on Ampere and beyond. [09/20/2024-18:23:41] [E] [TRT] Unexpected exception _Map_base::at Build engine successfully! yolov8_det: /home/xqy/Downloads/tensorrtx-master/yolov8/yolov8_det.cpp:29: void serialize_engine(std::string&, std::string&, int&, std::string&, float&, float&, int&): Assertion `serialized_engine' failed. Aborted 我不知道是serialize_engine这个函数的问题还是什么问题,希望您能指教一下,十分感谢。

你好,我遇到了和你一样的问题,请问你最后解决了吗?

@mpj1234
Copy link
Contributor

mpj1234 commented Dec 5, 2024

是的不支持,我已经提交了新的yolov8的tensorrt10支持的pr,可以查看 #1557, 或者等待合并到trt10分支

你好,我使用了你的代码,生成了可执行文件yolov8_det,但是在构建引擎时出现了这个错误,Loading weights: best.wts Your platform support int8: true Building engine, please wait for a while... reading calib cache: int8calib.table [09/20/2024-18:23:38] [W] [TRT] Heuristics has been ignored in this builder run. This feature is only supported on Ampere and beyond. [09/20/2024-18:23:41] [E] [TRT] Unexpected exception _Map_base::at Build engine successfully! yolov8_det: /home/xqy/Downloads/tensorrtx-master/yolov8/yolov8_det.cpp:29: void serialize_engine(std::string&, std::string&, int&, std::string&, float&, float&, int&): Assertion `serialized_engine' failed. Aborted 我不知道是serialize_engine这个函数的问题还是什么问题,希望您能指教一下,十分感谢。

你的fp16模型能测试通过?我提交代码时候测试int8没问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants