Fix quantization hang bugs.#16456
Conversation
| IrGraph), 'graph must be the instance of IrGraph.' | ||
| self._need_initialized.clear() | ||
| #sequential_execution = core.get_pass('sequential_execution_pass') | ||
| #sequential_execution.apply(graph.graph) |
There was a problem hiding this comment.
Please remove unused comments.
There was a problem hiding this comment.
可能需要,正在测试。如果不需要后面会去掉。
| self._op_output_rename_map[output_var_node.node] = dequant_var_node | ||
| return dequant_var_node | ||
|
|
||
| def _init_var_node(self, var_node, value): |
| tensor = self._scope.var(var_node.name()).get_tensor() | ||
| tensor.set(value, self._place) | ||
|
|
||
| def _to_node(self, nodes, node_name): |
There was a problem hiding this comment.
这个方法命名有点不太直观。。。你是想name_to_node吧?或者find_node_by_name?
There was a problem hiding this comment.
这个是个辅助函数,内部使用的,感觉这样简洁一点?
| core.graph_safe_remove_nodes(self.graph, original_nodes) | ||
|
|
||
| def resolve_hazard(self): | ||
| def _to_node(nodes, node_name): |
There was a problem hiding this comment.
不在同一个文件里面,_to_node只是一个辅助函数
| ordered_nodes = core.topology_sort(self.graph) | ||
| var_nodes = dict() | ||
| for node in ordered_nodes: | ||
| if node.is_op() and node.op() is not None: |
There was a problem hiding this comment.
什么情况下,node.op() is None?
|
请问这是会影响windows hang么? http://ci.paddlepaddle.org/viewLog.html?tab=buildLog&buildTypeId=PaddleWindows_PrWindowsCi&buildId=76062 |
windows那个问题,暂时无解,看看这个pr能否修复。而且windows那个也不是hang的问题,我这个pr修复的是之前和里面的reviewer讨论过的问题。 |
No description provided.