[Host] fix unique op bug#9908
Merged
mjp9527 merged 3 commits intoPaddlePaddle:developfrom Jan 11, 2023
mjp9527:fix_unique
Merged
[Host] fix unique op bug#9908mjp9527 merged 3 commits intoPaddlePaddle:developfrom mjp9527:fix_unique
mjp9527 merged 3 commits intoPaddlePaddle:developfrom
mjp9527:fix_unique
Conversation
|
Thanks for your contribution! |
zhupengyang
reviewed
Jan 9, 2023
Comment on lines
+385
to
+387
| UNIQUE_SET_OUT_PRECISION(index, dtype); | ||
| UNIQUE_SET_OUT_PRECISION(indices, dtype); | ||
| UNIQUE_SET_OUT_PRECISION(count, dtype); |
Collaborator
Author
There was a problem hiding this comment.
这块需要先判断index,indices,count是否为空,在判断dtype类型,不用宏就是写一堆if。感觉是个小问题,可以先不改吗
zhupengyang
approved these changes
Jan 11, 2023
Comment on lines
+61
to
+62
| CHECK(index_type_match) << "index type must be int32 or int64, but now is " | ||
| << static_cast<int>(index_type); |
Collaborator
There was a problem hiding this comment.
PrecisionToStr 将 PrecisionType 转为 std::string,而不是直接打印 int 类型
Comment on lines
+385
to
+387
| UNIQUE_SET_OUT_PRECISION(index, dtype); | ||
| UNIQUE_SET_OUT_PRECISION(indices, dtype); | ||
| UNIQUE_SET_OUT_PRECISION(count, dtype); |
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.
PR Type
bug fix
PR Change
kernel && OP
Describe
修复unique op在Host端bug,PaddleSeg部分模型,但输出index用不到时,不用进行类型判断检测