Skip to content

[XPU] elementwise_add, softmax unit test#2653

Merged
zhupengyang merged 2 commits into
PaddlePaddle:developfrom
zhupengyang:elt-add-xpu-1223
Dec 24, 2019
Merged

[XPU] elementwise_add, softmax unit test#2653
zhupengyang merged 2 commits into
PaddlePaddle:developfrom
zhupengyang:elt-add-xpu-1223

Conversation

@zhupengyang
Copy link
Copy Markdown
Collaborator

No description provided.

@zhupengyang zhupengyang changed the title [XPU] elementwise_add unit test [XPU] elementwise_add, softmax unit test Dec 23, 2019
Copy link
Copy Markdown
Collaborator

@hong19860320 hong19860320 left a comment

Choose a reason for hiding this comment

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

LGTM

#endif
}

#ifdef LITE_WITH_XPU
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

这样写是不是不妥,能否把test_elementwise拆成test_elementwise_add、test_elementwise_sub...,然后由于暂时只支持test_elementwise_add, 是否可将TEST(Elementwise, precision)改成如下:
TEST(Elementwise, precision) {
Place place;
#if defined(LITE_WITH_ARM)
place = TARGET(kARM));
#elif defined(LITE_WITH_XPU)
place = TARGET(kXPU);
test_elementwise_add(place); // Only elementwise add is supported by XPU now.
return;
#else
return;
#endif
test_elementwise_add(place);
test_elementwise_sub(place);
...
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

如果只是临时的代码,后续支持其它操作后应当删除TEST(Elementwise_XPU, precision),加入到TEST(Elementwise, precision)。这样可忽略上面的建议。

@zhupengyang zhupengyang merged commit 64d01cb into PaddlePaddle:develop Dec 24, 2019
@zhupengyang zhupengyang deleted the elt-add-xpu-1223 branch December 24, 2019 01:39
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