-
Notifications
You must be signed in to change notification settings - Fork 5.8k
【Infer Symbolic Shape BUAA No.70】Add lerp op #66837
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
Conversation
… develop upstream
你的PR提交成功,感谢你对开源项目的贡献! |
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
if (x_ndims > y_ndims) { | ||
out1_shape.assign(x_shape.begin(), x_shape.end()); | ||
} else if (x_ndims < y_ndims) { | ||
out1_shape.assign(y_shape.begin(), y_shape.end()); | ||
} else { | ||
symbol::DimExprBuilder builder; | ||
for (size_t i = 0; i < x_ndims; ++i) { | ||
out1_shape.emplace_back(builder.Broadcast(x_shape[i], y_shape[i])); | ||
infer_context->AddBroadcastableCstr(x_shape[i], y_shape[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.
rank不同也需要使用broadcast后的shape并且添加约束,对应于代码中前两个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.
不好意思,已经merge了,需要revert么
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.
收到,要不我下个 PR 再添上去吧
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.
不好意思,已经merge了,需要revert么
revert比较麻烦,泓清提示的是补充信息,不添加也能跑,我让一洲补充一个pr吧
)" This reverts commit 5914bd9.
PR Category
CINN
PR Types
Others
Description
Add lerp op.
考虑 x,y 和 w 的广播机制,推断出 output形状。