未验证 提交 ed97be09 编写于 作者: C ceci3 提交者: GitHub

fix int8 (#35504)

上级 0c71edc3
...@@ -903,8 +903,6 @@ int MultiHeadMatmulV2FusePass::BuildFusionV2(Graph* graph, ...@@ -903,8 +903,6 @@ int MultiHeadMatmulV2FusePass::BuildFusionV2(Graph* graph,
float, softmax_qk_op_desc->GetAttr("out_threshold")); float, softmax_qk_op_desc->GetAttr("out_threshold"));
multihead_op_desc.SetAttr("dp_probs", qkv_plugin_scale); multihead_op_desc.SetAttr("dp_probs", qkv_plugin_scale);
} }
} else {
multihead_op_desc.SetAttr("qkv2context_plugin_int8", false);
} }
auto* multihead = graph->CreateOpNode(&multihead_op_desc); auto* multihead = graph->CreateOpNode(&multihead_op_desc);
......
...@@ -42,8 +42,7 @@ class MultiheadMatMulOpConverter : public OpConverter { ...@@ -42,8 +42,7 @@ class MultiheadMatMulOpConverter : public OpConverter {
float* weight_data = nullptr; float* weight_data = nullptr;
bool enable_int8 = op_desc.HasAttr("enable_int8"); bool enable_int8 = op_desc.HasAttr("enable_int8");
bool qkv2context_plugin_int8 = bool qkv2context_plugin_int8 = op_desc.HasAttr("qkv2context_plugin_int8");
BOOST_GET_CONST(bool, op_desc.GetAttr("qkv2context_plugin_int8"));
float in_scale = 0.; float in_scale = 0.;
if (enable_int8) { if (enable_int8) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册