Skip to content

Conversation

@abhinavarora
Copy link
Contributor

No description provided.

@abhinavarora abhinavarora self-assigned this Mar 1, 2018
Copy link
Contributor

@chengduoZH chengduoZH left a comment

Choose a reason for hiding this comment

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

The unit tests are so many now!

delete ch;
}

TEST(ChannelHolder, TypeMismatchSendTest) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Checking type matching or not isn't the function of Channel, is it necessary to add the unit test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Channel enforces the datatype in send (https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/fluid/framework/channel.h#L74) and receive (https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/fluid/framework/channel.h#L81)

The channel makes sure that the variable being sent or received is same as the type of the channel. The unit test is to make sure the paddle enforce is executed.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see, thanks!

@abhinavarora abhinavarora merged commit 01536e8 into PaddlePaddle:develop Mar 1, 2018
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.

2 participants