|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
/**
|
|
|
|
|
* Copyright 2019 Huawei Technologies Co., Ltd
|
|
|
|
|
* Copyright 2019-2021 Huawei Technologies Co., Ltd
|
|
|
|
|
*
|
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
@ -405,6 +405,9 @@ bool UbPatternFusion::ReplaceFusionOp(std::unordered_map<int64_t, BufferFusionIn
|
|
|
|
|
session::KernelGraph *kernel_graph) const {
|
|
|
|
|
MS_EXCEPTION_IF_NULL(buffer_fusion_infos);
|
|
|
|
|
auto buffer_fusion_info = (*buffer_fusion_infos)[fusion_id];
|
|
|
|
|
if (buffer_fusion_info.anf_nodes.size() < 2) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
TraceGuard guard(std::make_shared<TraceOpt>(buffer_fusion_info.anf_nodes[0]->debug_info()));
|
|
|
|
|
auto buffer_fusion = CreateFusionOp(buffer_fusion_info.inputs_list, buffer_fusion_info.outputs_list,
|
|
|
|
|
buffer_fusion_info.anf_nodes, kernel_graph);
|
|
|
|
|