Browse Source

not fusion mul add for uint8

tags/v1.1.0
zhaozhenlong 5 years ago
parent
commit
e042005780
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      mindspore/lite/tools/converter/legacy_optimizer/fusion/mul_add_fusion_pass.cc

+ 4
- 0
mindspore/lite/tools/converter/legacy_optimizer/fusion/mul_add_fusion_pass.cc View File

@@ -98,6 +98,10 @@ STATUS MulAddFusionPass::DoFusion(MetaGraphT *graph, const std::string &patternN
// dont fusion, return
return RET_OK;
}
if (mulNodeBiasTensor->dataType == TypeId::kNumberTypeUInt8) {
MS_LOG(DEBUG) << "won't fusion uint8 mul add for precision.";
return RET_OK;
}
// add node the second tensor is not constant tensor, don't fusion
auto addNodeInputIndex = addNode->inputIndex;
if (addNodeInputIndex.size() != ADD_OP_INPUT_NUM) {


Loading…
Cancel
Save