已合并
【PR】: 简要描述 删除不需要使用的文件 graph_dump_utils.h #1366
shengnan创建于 7月20日
【PR】: 简要描述 删除不需要使用的文件 graph_dump_utils.h #1366
已合并
共 4 个文件变更+0-61
| @@ -1,58 +0,0 @@ | |||
| 1 | -/** | ||
| 2 | - * Copyright (c) 2025 Huawei Technologies Co., Ltd. | ||
| 3 | - * This program is free software, you can redistribute it and/or modify it under the terms and conditions of | ||
| 4 | - * CANN Open Software License Agreement Version 2.0 (the "License"). | ||
| 5 | - * Please refer to the License for details. You may not use this file except in compliance with the License. | ||
| 6 | - * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, | ||
| 7 | - * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. | ||
| 8 | - * See LICENSE in the root of the software repository for the full text of the License. | ||
| 9 | - */ | ||
| 10 | - | ||
| 11 | -#ifndef INC_GRAPH_UTILS_GRAPH_DUMP_UTILS_H | ||
| 12 | -#define INC_GRAPH_UTILS_GRAPH_DUMP_UTILS_H | ||
| 13 | - | ||
| 14 | -#include "graph/compute_graph.h" | ||
| 15 | -#include "graph/fast_graph/execute_graph.h" | ||
| 16 | -#include "graph/utils/execute_graph_adapter.h" | ||
| 17 | -#include "graph/utils/graph_utils.h" | ||
| 18 | -#include "mmpa/mmpa_api.h" | ||
| 19 | - | ||
| 20 | -namespace af { | ||
| 21 | -/** | ||
| 22 | - * 将ComputeGraph落盘成文件 | ||
| 23 | - * @param compute_graph 要落盘的对象 | ||
| 24 | - * @param name 落盘的文件名,会拼接上默认的前后缀 | ||
| 25 | - * @return | ||
| 26 | - */ | ||
| 27 | -inline void DumpGraph(const ComputeGraphPtr &compute_graph, const char_t *const name) { | ||
| 28 | - af::GraphUtils::DumpGEGraph(compute_graph, name); | ||
| 29 | - af::GraphUtils::DumpGEGraphToOnnx(*compute_graph, name); | ||
| 30 | - af::GraphUtils::DumpGEGraphToReadable(compute_graph, name); | ||
| 31 | - uint64_t i = 0U; | ||
| 32 | - for (const auto &sub_graph_func : compute_graph->GetAllSubgraphs()) { | ||
| 33 | - const auto sub_graph_func_name = std::string(name) + std::string("_sub_graph_") + std::to_string(i++); | ||
| 34 | - af::GraphUtils::DumpGEGraph(sub_graph_func, sub_graph_func_name); | ||
| 35 | - af::GraphUtils::DumpGEGraphToOnnx(*sub_graph_func, sub_graph_func_name); | ||
| 36 | - af::GraphUtils::DumpGEGraphToReadable(sub_graph_func, sub_graph_func_name); | ||
| 37 | - } | ||
| 38 | -} | ||
| 39 | - | ||
| 40 | -/** | ||
| 41 | - * 将ExecuteGraph落盘成文件 | ||
| 42 | - * @param execute_graph 要落盘的对象 | ||
| 43 | - * @param name 落盘的文件名,会拼接上默认的前后缀 | ||
| 44 | - * @return | ||
| 45 | - */ | ||
| 46 | -inline void DumpGraph(ExecuteGraph *execute_graph, const char_t *const name) { | ||
| 47 | - const char_t *dump_ge_graph = nullptr; | ||
| 48 | - MM_SYS_GET_ENV(MM_ENV_DUMP_GE_GRAPH, dump_ge_graph); | ||
| 49 | - if (dump_ge_graph == nullptr) { | ||
| 50 | - return; | ||
| 51 | - } | ||
| 52 | - const auto compute_graph = ExecuteGraphAdapter::ConvertExecuteGraphToComputeGraph(execute_graph); | ||
| 53 | - if (compute_graph != nullptr) { | ||
| 54 | - DumpGraph(compute_graph, name); | ||
| 55 | - } | ||
| 56 | -} | ||
| 57 | -} // namespace af | ||
| 58 | -#endif // INC_GRAPH_UTILS_GRAPH_DUMP_UTILS_H | ||
| @@ -24,7 +24,6 @@ | |||
| 24 | #include "graph/utils/node_utils.h" | 24 | #include "graph/utils/node_utils.h" |
| 25 | #include "ascir_ops.h" | 25 | #include "ascir_ops.h" |
| 26 | #include "ascir_ops_utils.h" | 26 | #include "ascir_ops_utils.h" |
| 27 | -#include "graph_dump_utils.h" | ||
| 28 | #include "schedule_utils.h" | 27 | #include "schedule_utils.h" |
| 29 | #include "ascir_utils.h" | 28 | #include "ascir_utils.h" |
| 30 | #include "ascgraph_info_complete.h" | 29 | #include "ascgraph_info_complete.h" |
| @@ -20,7 +20,6 @@ | |||
| 20 | #include "graph/utils/op_desc_utils.h" | 20 | #include "graph/utils/op_desc_utils.h" |
| 21 | #include "ascir_ops.h" | 21 | #include "ascir_ops.h" |
| 22 | #include "attribute_group/attr_group_symbolic_desc.h" | 22 | #include "attribute_group/attr_group_symbolic_desc.h" |
| 23 | -#include "graph_dump_utils.h" | ||
| 24 | #include "fused_graph/fused_graph_modifier.h" | 23 | #include "fused_graph/fused_graph_modifier.h" |
| 25 | #include "graph/ascendc_ir/utils/asc_graph_utils.h" | 24 | #include "graph/ascendc_ir/utils/asc_graph_utils.h" |
| 26 | #include "graph_utils.h" | 25 | #include "graph_utils.h" |
| @@ -19,7 +19,6 @@ | |||
| 19 | #include "graph/utils/op_desc_utils.h" | 19 | #include "graph/utils/op_desc_utils.h" |
| 20 | #include "ascir_ops.h" | 20 | #include "ascir_ops.h" |
| 21 | #include "attribute_group/attr_group_symbolic_desc.h" | 21 | #include "attribute_group/attr_group_symbolic_desc.h" |
| 22 | -#include "graph_dump_utils.h" | ||
| 23 | #define private public | 22 | #define private public |
| 24 | #include "fused_graph/fused_graph_unfolder.h" | 23 | #include "fused_graph/fused_graph_unfolder.h" |
| 25 | #undef private | 24 | #undef private |