-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
【pir】modify test_case.py #60976
【pir】modify test_case.py #60976
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
true_block.size(), | ||
0u, | ||
phi::errors::PreconditionNotMet( | ||
"The true block must have at least one op yield op.")); |
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.
"The true block must have at least one op yield op.")); | |
"The true block must have at least one op (inlcuding yield op).")); |
false_block.size(), | ||
0u, | ||
phi::errors::PreconditionNotMet( | ||
"The false block must have at least one op yield op.")); |
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.
"The false block must have at least one op yield op.")); | |
"The false block must have at least one op(including yield op).")); |
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 优化
(sub block nest should Add on demand to aviod block copy) | ||
''' | ||
total_ops = [] | ||
if block.parent_block is not None: |
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.
这里 total 的语义是只包括入参block的父亲和祖父 block?
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.
理论上是所有的祖block ,但是为了避免使用while,造成block 的拷贝,只限制了两层
(*this)->region(0).size())); | ||
if ((*this)->region(1).front().size() > 0) { | ||
auto &false_last_op = (*this)->region(1).front().back(); | ||
VLOG(4) << "Start Verifying false branch."; |
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.
false branch 的 verify 建议放在最上面的 if ((*this)->num_results() != 0)
分支语句之外,因为我们要求 if 分支不能只有一个分支,现在的逻辑下,如果 num_results == 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.
这个功能是为了在num_results= 0 的时候跳过检查,允许if 无yield op
PR types
others
PR changes
others
Description
pcard-67164
修复子block 中调用append_backward的样例