未验证 提交 3a0690e6 编写于 作者: D duanboqiang 提交者: GitHub

fix issue (#47250)

上级 bc47e7ac
......@@ -124,7 +124,7 @@ void IrParamsSyncAmongDevicesPass::CopyParamsToGpu(Argument *argument) {
if (!var_node->Var()->Persistable()) continue;
auto var_name = var_node->Var()->Name();
auto *var = scope->FindLocalVar(var_name);
if (var->IsType<phi::DenseTensor>() || var->IsType<phi::DenseTensor>()) {
if (var->IsType<phi::DenseTensor>()) {
auto *t = var->GetMutable<phi::DenseTensor>();
params_total_bytes += t->numel() * experimental::SizeOf(t->dtype());
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册