CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
【Infer Symbolic Shape BUAA No.64】Add inverse op #66633
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
你的PR提交成功,感谢你对开源项目的贡献! |
test/legacy_test/test_inverse_op.py
Outdated
@@ -49,6 +49,7 @@ def setUp(self): | |||
|
|||
def test_check_output(self): | |||
self.check_output(check_pir=True) | |||
self.check_output(check_symbol_infer=True) |
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.
删掉这行,check_output 接口里check_pir 和 check_symbol_infer都是默认开启的
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.
已删除
"But received: Input(Input)'s dimension = %zu, shape = [%s].", | ||
input_rank, | ||
input_dims)); | ||
|
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.
是否能参考infermeta 添加一个 equalcstr 约束?
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.
和infermeta的报错形式相同
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.
和infermeta的报错形式相同
infermeta里有 PADDLE_ENFORCE_EQ 这么个约束,看一下是否在infersymbolicshape 里添加对应的 infer_context->AddEqualCstr约束
input_rank, | ||
2, | ||
phi::errors::InvalidArgument( | ||
"The dimension of Input(Input) is expected to be no less than 2. " |
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.
报错给出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.
已解决
test_inverse_op.py 中已包含OpTest单测,self.check_output() 确认使用,申请approve流水线 |
paddle/fluid/pir/dialect/operator/interface/infer_symbolic_shape/unary_infer_sym.cc
Outdated
Show resolved
Hide resolved
paddle/fluid/pir/dialect/operator/interface/infer_symbolic_shape/unary_infer_sym.cc
Outdated
Show resolved
Hide resolved
paddle/fluid/pir/dialect/operator/interface/infer_symbolic_shape/unary_infer_sym.cc
Outdated
Show resolved
Hide resolved
std::vector<symbol::DimExpr> input_dims = input_shape.shape(); | ||
int input_rank = input_dims.size(); | ||
|
||
for (int i = 0; i < input_rank; 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.
整个删掉这个for循环的判断
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 |
PR Category
CINN
PR Types
improvements
Description
添加inverse算子符号推导接口