提交 0537cb74 编写于 作者: M Megvii Engine Team

chore(mge/imperative): fix BackwardGraph for jit.trace

GitOrigin-RevId: 16e86a21d75ab467541b625289478c88ff175e1c
上级 4101d5bc
......@@ -254,6 +254,7 @@ class trace:
def _compile(self):
graph = self._graph = G.Graph()
graph.options.no_force_inplace = True
# graph.options.graph_opt_level = 0
need_reset_nodes = self._need_reset_nodes = []
# links enforce ordering of I/O nodes
......
......@@ -105,6 +105,7 @@ void init_graph_rt(py::module m) {
DEF_READWRITE(enable_grad_var_static_reshape)
DEF_READWRITE(enable_memory_swap)
DEF_READWRITE(comp_node_seq_record_level)
DEF_READWRITE(no_force_inplace)
// DEF_READWRITE(eager_evaluation)
// DEF_READWRITE(imperative_proxy_graph)
// DEF_READWRITE(extra_vardeps)
......
......@@ -81,6 +81,18 @@ public:
return m_graph;
}
bool is_same_st(const Hashable& rhs) const override {
if (!rhs.same_type<BackwardGraph>()) {
return false;
}
auto& other = rhs.cast_final_safe<BackwardGraph>();
if (this == &other) {
return true;
}
// FIXME
return false;
}
private:
InternalGraph m_graph;
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册