-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
[NewIR] support elementwise operations with axis!=-1 #55699
[NewIR] support elementwise operations with axis!=-1 #55699
Conversation
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 overall
"Expected op[%s]'s input X has only 1 variable, but got %d", | ||
op_desc.Type(), | ||
x_names.size()); | ||
auto x_name = x_names[0]; |
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.
后续可以留意下auto的位置是否可以优先使用auto&,除了有copy的开销,更重要的是有时候可能会触发隐藏的bug(之前跟zhiqiu一起遇到过)
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.
好的,之后会注意下。
ir::OpResult y_new; | ||
if (std::find(y_shape.begin(), y_shape.end(), -1) == y_shape.end()) { | ||
std::vector<int64_t> y_new_shape(y_shape); | ||
for (int i = 0; i <= append_size; i++) { |
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.
Not Important,但++i好像更高效些,可以看下二者的区别
for (int i = 0; i <= append_size; i++) { | |
for (int i = 0; i <= append_size; ++i) { |
PR types
Others
PR changes
Others
Description
close #55485
Others
Pcard-67164