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
[CINN] Add symbolic select #63971
[CINN] Add symbolic select #63971
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
e0b4244
to
50500ec
Compare
182593f
to
b8bb79e
Compare
cond_dims.size(), | ||
x_dims.size())); | ||
size_t cond_dims_size = static_cast<size_t>(cond_dims.size()); | ||
for (size_t i = 0; i < cond_dims_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.
这里对于cond_dim、x_dim、y_dim的比较逻辑看起来是一致的,可以考虑使用lambda函数服用逻辑
return paddle.tensor.where(cond, true_branch.sin(), false_branch) | ||
|
||
|
||
class TestWhere(unittest.TestCase): |
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.
这里建议继承 base.py 里的TestBase,只重写 init函数逻辑即可。
* fix where op infer meta check * convert where to cinn select * convert where to cinn select * [CINN] add symbolic select for where --------- Co-authored-by: phlrain <phliuhongyu@126.com>
PR Category
CINN
PR Types
New features
Description
Pcard-83399
We add symbolic select.