未验证 提交 54e1455a 编写于 作者: L Leo Chen 提交者: GitHub

Print info for each layer in TRT inspector to avoid log being too long (#54748)

上级 259b18a7
...@@ -870,8 +870,10 @@ void TensorRTEngine::GetEngineInfo() { ...@@ -870,8 +870,10 @@ void TensorRTEngine::GetEngineInfo() {
infer_engine_->createEngineInspector()); infer_engine_->createEngineInspector());
auto *infer_context = context(); auto *infer_context = context();
infer_inspector->setExecutionContext(infer_context); infer_inspector->setExecutionContext(infer_context);
LOG(INFO) << infer_inspector->getEngineInformation( for (int i = 0; i < infer_engine_->getNbLayers(); ++i) {
nvinfer1::LayerInformationFormat::kJSON); LOG(INFO) << infer_inspector->getLayerInformation(
i, nvinfer1::LayerInformationFormat::kJSON);
}
LOG(INFO) << "====== engine info end ======"; LOG(INFO) << "====== engine info end ======";
#else #else
LOG(INFO) << "Inspector needs TensorRT version 8.2 and after."; LOG(INFO) << "Inspector needs TensorRT version 8.2 and after.";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册