Skip to content

Conversation

@dzhwinter
Copy link
Contributor

@dzhwinter dzhwinter commented Dec 24, 2017

fix #6933

And our CI is failed now because of removing PLACE_BIT macro in the previous PR. So this one should be merged ASAP.
Thanks!

size_t operator()(const platform::Place& place) const {
int pre_hash = place.which()
<< (sizeof(int) * 8 - NUM_PLACE_TYPE_LIMIT_IN_BIT);
int pre_hash = place.which() + (1 << LEFT_SHIFT);
Copy link
Member

Choose a reason for hiding this comment

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

why not

int pre_hash = place.which() << LEFT_SHIFT;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we assume there will be only two kinds of Place, these two methods will be same. Otherwise, place will get an overlap with data_type.

Copy link
Member

@jacquesqiao jacquesqiao left a comment

Choose a reason for hiding this comment

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

merge to fix the compilation

@jacquesqiao jacquesqiao merged commit 7e659a0 into PaddlePaddle:develop Dec 24, 2017
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.

hash combine is unused in kernelkey

2 participants