forked from mindspore-Ecosystem/mindspore
!25564 [GraphKernel]Fix Static Check on master
Merge pull request !25564 from jiaoy1224/aot
This commit is contained in:
commit
81ed538f3d
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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});
|
||||
}
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue