-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copy Constructor for ProgramDesc #4895
Copy Constructor for ProgramDesc #4895
Conversation
and Rename `Sync` to `Flush`
Since lots of types can be cast to bool
…oung/Paddle into dev_impl_conv2d_layer
… dev_impl_conv2d_layer
… dev_impl_conv2d_layer
…_global_instance_of_program
…_global_instance_of_program
…_global_instance_of_program
…reyoung/Paddle into fix_backward_bug
…_global_instance_of_program
…_global_instance_of_program
…_global_instance_of_program
…_global_instance_of_program
…/copy_ctor_program_des
…_global_instance_of_program
…/copy_ctor_program_des
… fix_backward_bug
… fix_backward_bug
for (size_t i = 0; i < global_block->OpSize(); ++i) { | ||
auto op_origin = global_block->Op(i); | ||
auto op_copy = global_block->Op(i); | ||
ASSERT_EQ(op_copy->Proto()->SerializeAsString(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we shall check they are not the same op first?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
assert start_index is not None | ||
assert end_index is not None | ||
assert start_index <= end_index | ||
if len(self.ops) != 0: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fix #4896
Note: #4894 is merged into this PR, please review and merge #4894 first.