ONNX 转 TRT 失败-tensorRT
bool build_ok = buildAndSaveEngine(ONNX_PATH, TRT_ENGINE_PATH);
if (!build_ok) { ShowMsg("ONNX 转 TRT 失败!"); delete runtime; return; }
1.显卡需要rtx3060
2.需要如下转换
std::string temp_std_str = onnx_path.toStdString();
std::string temp_std_trt_path = trt_path.toStdString();
ONNX_PATH = temp_std_str.c_str();
TRT_ENGINE_PATH = temp_std_trt_path.c_str();
否则ONNX_PATH, TRT_ENGINE_PATH,地址都是空
欢迎讨论,相互学习。
cdtxw@foxmail.com

浙公网安备 33010602011771号