[XPU] elementwise_add, softmax unit test#2653
Merged
Merged
Conversation
test=develop
test=develop
hong19860320
approved these changes
Dec 23, 2019
| #endif | ||
| } | ||
|
|
||
| #ifdef LITE_WITH_XPU |
Collaborator
There was a problem hiding this comment.
这样写是不是不妥,能否把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);
...
}
Collaborator
There was a problem hiding this comment.
如果只是临时的代码,后续支持其它操作后应当删除TEST(Elementwise_XPU, precision),加入到TEST(Elementwise, precision)。这样可忽略上面的建议。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.