Skip to content

Fix quantization hang bugs.#16456

Merged
wzzju merged 3 commits intoPaddlePaddle:developfrom
wzzju:fix_quan_hang
Mar 27, 2019
Merged

Fix quantization hang bugs.#16456
wzzju merged 3 commits intoPaddlePaddle:developfrom
wzzju:fix_quan_hang

Conversation

@wzzju
Copy link
Contributor

@wzzju wzzju commented Mar 26, 2019

No description provided.

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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove unused comments.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可能需要,正在测试。如果不需要后面会去掉。

self._op_output_rename_map[output_var_node.node] = dequant_var_node
return dequant_var_node

def _init_var_node(self, var_node, value):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line485的方法有什么区别么?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不在一个类里面,但是都需要这个功能。

tensor = self._scope.var(var_node.name()).get_tensor()
tensor.set(value, self._place)

def _to_node(self, nodes, node_name):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个方法命名有点不太直观。。。你是想name_to_node吧?或者find_node_by_name?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个是个辅助函数,内部使用的,感觉这样简洁一点?

core.graph_safe_remove_nodes(self.graph, original_nodes)

def resolve_hazard(self):
def _to_node(nodes, node_name):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个方法又实现了一遍?可以复用么?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不在同一个文件里面,_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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

什么情况下,node.op() is None?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ctr_node或者empty node

@luotao1
Copy link
Contributor

luotao1 commented Mar 27, 2019

请问这是会影响windows hang么?

[03:57:12]	457/464 Test #463: test_quantization_pass ..........................***Failed   15.05 sec
[03:57:12]	
[03:57:12]	
[03:57:12]	
[03:57:12]	
[03:57:12]	
[03:57:12]	
[03:57:12]	
[03:57:12]	
[03:57:12]	.
[03:57:12]	
[03:57:12]	
[03:57:12]	
[03:57:12]	
[03:57:12]	
[03:57:12]	
[03:57:12]	
[03:57:12]	
[03:57:12]	
[03:57:12]	
[03:57:12]	
[03:57:12]	
[03:57:12]	This application has requested the Runtime to terminate it in an unusual way.
[03:57:12]	Please contact the application's support team for more information.
[03:57:12]	W0327 11:57:01.409394 27508 graph.h:204] WARN: After a series of passes, the current graph can be quite different from OriginProgram. So, please avoid using the `OriginProgram()` method!
[03:57:12]	W0327 11:57:04.076364 27508 graph.h:204] WARN: After a series of passes, the current graph can be quite different from OriginProgram. So, please avoid using the `OriginProgram()` method!
[03:57:12]	W0327 11:57:06.304749 27508 graph.h:204] WARN: After a series of passes, the current graph can be quite different from OriginProgram. So, please avoid using the `OriginProgram()` method!
[03:57:12]	W0327 11:57:08.452008 27508 graph.h:204] WARN: After a series of passes, the current graph can be quite different from OriginProgram. So, please avoid using the `OriginProgram()` method!
[03:57:12]	W0327 11:57:10.598065 27508 graph.h:204] WARN: After a series of passes, the current graph can be quite different from OriginProgram. So, please avoid using the `OriginProgram()` method!

http://ci.paddlepaddle.org/viewLog.html?tab=buildLog&buildTypeId=PaddleWindows_PrWindowsCi&buildId=76062
Description能不能写的详细点?

@wzzju wzzju merged commit d68a02a into PaddlePaddle:develop Mar 27, 2019
@wzzju
Copy link
Contributor Author

wzzju commented Mar 27, 2019

请问这是会影响windows hang么?

[03:57:12]	457/464 Test #463: test_quantization_pass ..........................***Failed   15.05 sec
[03:57:12]	
[03:57:12]	
[03:57:12]	
[03:57:12]	
[03:57:12]	
[03:57:12]	
[03:57:12]	
[03:57:12]	
[03:57:12]	.
[03:57:12]	
[03:57:12]	
[03:57:12]	
[03:57:12]	
[03:57:12]	
[03:57:12]	
[03:57:12]	
[03:57:12]	
[03:57:12]	
[03:57:12]	
[03:57:12]	
[03:57:12]	
[03:57:12]	This application has requested the Runtime to terminate it in an unusual way.
[03:57:12]	Please contact the application's support team for more information.
[03:57:12]	W0327 11:57:01.409394 27508 graph.h:204] WARN: After a series of passes, the current graph can be quite different from OriginProgram. So, please avoid using the `OriginProgram()` method!
[03:57:12]	W0327 11:57:04.076364 27508 graph.h:204] WARN: After a series of passes, the current graph can be quite different from OriginProgram. So, please avoid using the `OriginProgram()` method!
[03:57:12]	W0327 11:57:06.304749 27508 graph.h:204] WARN: After a series of passes, the current graph can be quite different from OriginProgram. So, please avoid using the `OriginProgram()` method!
[03:57:12]	W0327 11:57:08.452008 27508 graph.h:204] WARN: After a series of passes, the current graph can be quite different from OriginProgram. So, please avoid using the `OriginProgram()` method!
[03:57:12]	W0327 11:57:10.598065 27508 graph.h:204] WARN: After a series of passes, the current graph can be quite different from OriginProgram. So, please avoid using the `OriginProgram()` method!

http://ci.paddlepaddle.org/viewLog.html?tab=buildLog&buildTypeId=PaddleWindows_PrWindowsCi&buildId=76062
Description能不能写的详细点?

windows那个问题,暂时无解,看看这个pr能否修复。而且windows那个也不是hang的问题,我这个pr修复的是之前和里面的reviewer讨论过的问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants