!25564 [GraphKernel]Fix Static Check on master

Merge pull request !25564 from jiaoy1224/aot
This commit is contained in:
i-robot 2021-10-29 01:54:36 +00:00 committed by Gitee
commit 81ed538f3d
7 changed files with 5 additions and 13 deletions

View File

@ -40,7 +40,6 @@
namespace mindspore {
namespace kernel {
constexpr int32_t MAX_ERROR_LEN = 1024;
constexpr int32_t PROCESS_NUM = 16;
constexpr int32_t TIME_OUT = 300;

View File

@ -27,7 +27,6 @@
#include "backend/optimizer/graph_kernel/graph_kernel_helper.h"
#include "backend/session/anf_runtime_algorithm.h"
#include "backend/session/kernel_graph.h"
#include "debug/anf_ir_dump.h"
namespace mindspore::graphkernel {
CNodePtr StitchAtomicCleanInsertter::CreateInplaceAssignNode(const FuncGraphPtr &sub_graph,

View File

@ -982,7 +982,7 @@ FuncGraphManagerPtr GetFuncGraphManager(const FuncGraphPtr &func_graph) {
return manager;
}
void UpdateMng(FuncGraphManagerPtr mng, const FuncGraphPtr &func_graph) {
void UpdateMng(const FuncGraphManagerPtr &mng, const FuncGraphPtr &func_graph) {
mng->RemoveRoots();
mng->KeepRoots({func_graph});
}

View File

@ -144,6 +144,6 @@ std::vector<PrimitivePtr> GetValidOps(
// return a func_graph's manager
FuncGraphManagerPtr GetFuncGraphManager(const FuncGraphPtr &func_graph);
void UpdateMng(FuncGraphManagerPtr mng, const FuncGraphPtr &func_graph);
void UpdateMng(const FuncGraphManagerPtr &mng, const FuncGraphPtr &func_graph);
} // namespace mindspore::graphkernel
#endif // MINDSPORE_CCSRC_BACKEND_OPTIMIZER_GRAPH_KERNEL_GRAPH_KERNEL_HELPER_H_

View File

@ -347,7 +347,6 @@ bool ReorderOps::ReorderCastTypeInsensitive(const FuncGraphPtr &func_graph) {
}
bool ReorderOps::Run(const FuncGraphPtr &func_graph) {
auto mng = GetFuncGraphManager(func_graph);
bool changed = false;
auto todos = TopoSort(func_graph->get_return());
for (const auto &anf_node : todos) {

View File

@ -30,12 +30,11 @@
#include "ir/tensor.h"
#include "utils/utils.h"
#include "utils/log_adapter.h"
#include "backend/session/anf_runtime_algorithm.h"
#include "backend/session/kernel_graph.h"
#include "backend/kernel_compiler/kernel.h"
#include "backend/kernel_compiler/common_utils.h"
#include "backend/optimizer/graph_kernel/graph_kernel_helper.h"
#include "backend/session/anf_runtime_algorithm.h"
#include "backend/session/kernel_graph.h"
#include "debug/anf_ir_dump.h"
namespace mindspore::graphkernel {
class TsaChecker : public AtomicAddChecker {
@ -255,8 +254,7 @@ bool TsaAtomicAddToFirstTensor::Run(const FuncGraphPtr &func_graph) {
}
if (changed) {
mng->RemoveRoots();
mng->KeepRoots({func_graph});
UpdateMng(mng, func_graph);
}
return changed;

View File

@ -29,13 +29,10 @@
#include "base/core_ops.h"
#include "ir/tensor.h"
#include "utils/utils.h"
#include "utils/log_adapter.h"
#include "backend/kernel_compiler/kernel.h"
#include "backend/kernel_compiler/common_utils.h"
#include "backend/optimizer/graph_kernel/graph_kernel_helper.h"
#include "backend/session/anf_runtime_algorithm.h"
#include "backend/session/kernel_graph.h"
#include "debug/anf_ir_dump.h"
namespace mindspore::graphkernel {
class UssChecker : public AtomicAddChecker {