未验证 提交 e123b98e 编写于 作者: W Wilber 提交者: GitHub

fix paddle-trt bug when encounter inplace var + weight share condition. (#53184)

上级 c55935c4
......@@ -297,6 +297,16 @@ void TensorRtSubgraphPass::CreateTensorRTOp(
}
}
// var may have the same name but not have the same id.
// e.g., var(batch_norm2d_0.w_1) may have id: 10, 13, 25.... in a graph.
// so we must find all the var_name+id.
// https://github.com/PaddlePaddle/Paddle/pull/53184
for (auto *n : graph->Nodes()) {
if (n->IsVar() && input_names.count(n->Name())) {
input_names_with_id.insert(n->Name() + std::to_string(n->id()));
}
}
auto model_precision =
static_cast<phi::DataType>(Get<int>("model_precision"));
auto mixed_black_list =
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册