-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Host] fix unique op bug #9908
[Host] fix unique op bug #9908
Conversation
Thanks for your contribution! |
UNIQUE_SET_OUT_PRECISION(index, dtype); | ||
UNIQUE_SET_OUT_PRECISION(indices, dtype); | ||
UNIQUE_SET_OUT_PRECISION(count, dtype); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里不需要用宏。不用宏的代码量其实会更少
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这块需要先判断index,indices,count是否为空,在判断dtype类型,不用宏就是写一堆if。感觉是个小问题,可以先不改吗
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
CHECK(index_type_match) << "index type must be int32 or int64, but now is " | ||
<< static_cast<int>(index_type); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PrecisionToStr 将 PrecisionType 转为 std::string,而不是直接打印 int 类型
UNIQUE_SET_OUT_PRECISION(index, dtype); | ||
UNIQUE_SET_OUT_PRECISION(indices, dtype); | ||
UNIQUE_SET_OUT_PRECISION(count, dtype); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
PR Type
bug fix
PR Change
kernel && OP
Describe
修复unique op在Host端bug,PaddleSeg部分模型,但输出index用不到时,不用进行类型判断检测