Skip to content

Conversation

@QiJune
Copy link
Member

@QiJune QiJune commented Dec 27, 2017

Fix #7057

Refer to #6991 (comment)


if (actual_kernel_key == expected_kernel_key) {
kernel_iter->second->Compute(ctx);
PADDLE_ENFORCE_EQ(actual_kernel_key.place_, expected_kernel_key.place_,
Copy link
Member

Choose a reason for hiding this comment

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

actual_kernel_key == expected_kernel_key

是不是默认包含了

actual_kernel_key.place_ == expected_kernel_key.place_

Copy link
Member Author

Choose a reason for hiding this comment

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

不是的,kernel key重载的相等操作符是判断是同一种place,并不能分辨CUDAPlace0 和 CUDApLace1

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.

LGTM!

@QiJune QiJune merged commit 7aed7eb into PaddlePaddle:develop Dec 27, 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.

2 participants