Skip to content

Conversation

@luotao1
Copy link
Contributor

@luotao1 luotao1 commented Apr 3, 2018

Currently, sync_with_cpp only deals with adding ops or adding variables from c++ end. Thus, if we call block.remove_op first, and then call block.sync_with_cpp, there exist errors.

This PR refines sync_with_cpp when removing ops or remove variables from c++ end, and test the sync_with_cpp function in the unit test.

@luotao1 luotao1 requested a review from typhoonzero April 3, 2018 09:07
Copy link
Contributor

@typhoonzero typhoonzero left a comment

Choose a reason for hiding this comment

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

LGTM++ just one minor comment

def test_remove_op(self):
prog = core.ProgramDesc()
program = Program()
prog = program.desc
Copy link
Contributor

Choose a reason for hiding this comment

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

prog_desc can be more clear.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I will update it in next PR.

@luotao1 luotao1 merged commit 9571045 into PaddlePaddle:develop Apr 3, 2018
@luotao1 luotao1 added the 预测 原名Inference,包含Capi预测问题等 label Apr 3, 2018
@luotao1 luotao1 deleted the sync_with_cpp branch April 3, 2018 10:55
This was referenced Apr 3, 2018
typhoonzero pushed a commit to typhoonzero/Paddle that referenced this pull request Apr 4, 2018
refine sync_with_cpp when remove ops or remove vars
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

预测 原名Inference,包含Capi预测问题等

2 participants