提交 767fa474 编写于 作者: M Megvii Engine Team

fix(mgb): add detail error message for trt version diff

GitOrigin-RevId: 217a2d1faa852781bf9435f735159019e6010dac
上级 94e49fae
......@@ -238,7 +238,11 @@ SymbolVarArray TensorRTRuntimeOpr::make(
auto gpu_allocator = std::make_shared<GpuAllocator>(src[0].node()->comp_node());
runtime->setGpuAllocator(gpu_allocator.get());
auto engine = runtime->deserializeCudaEngine(buf, buf_size, nullptr);
mgb_assert(engine, "failed to deserialize ICudaEngine");
mgb_assert(
engine,
"Failed to deserialize ICudaEngine, may caused by "
"different TensorRT version.\nPlease make sure you are using the "
"same GPU hardware and TensorRT version as serialization.");
return make(to_shared_ptr_engine(engine), gpu_allocator, src, config);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册