未验证 提交 19feba38 编写于 作者: C Chen Weihang 提交者: GitHub

Fix compile error of mkldnn and tensorrt (#47388)

* fix compile error of mkldnn

* fix tensorrt error
上级 54dd19be
......@@ -73,7 +73,7 @@ void FuseOperatorScaleOneDNNPass::FuseScale(Graph *graph,
auto *scale_var = scope->FindVar(scale_var_name);
// ScaleTensor must be weight
if (scale_var == nullptr) return;
auto *scale_tensor = scale_var->GetMutable<LoDTensor>();
auto *scale_tensor = scale_var->GetMutable<phi::DenseTensor>();
scale = *(scale_tensor->data<float>());
}
......
......@@ -49,8 +49,8 @@ class PrelnLayerNormShiftPartitionOpConverter : public OpConverter {
? PADDLE_GET_CONST(int, op_desc.GetAttr("shift_size"))
: 0;
auto* Bias_t = Bias_v->GetMutable<framework::LoDTensor>();
auto* Scale_t = Scale_v->GetMutable<framework::LoDTensor>();
auto* Bias_t = Bias_v->GetMutable<phi::DenseTensor>();
auto* Scale_t = Scale_v->GetMutable<phi::DenseTensor>();
auto bias_weight =
engine_->GetFp32TrtWeight(op_desc.Input("Bias").front(), *Bias_t);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册