-
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
【Infer Symbolic Shape No.170】【BUAA】 Add read_file op #67889
【Infer Symbolic Shape No.170】【BUAA】 Add read_file op #67889
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
bool ReadFileOpInferSymbolicShape( | ||
pir::Operation *op, pir::InferSymbolicShapeContext *infer_context) { | ||
std::vector<symbol::DimExpr> output_shape = {symbol::DimExpr(1), | ||
symbol::DimExpr(-1)}; |
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.
-1是meta中表示动态维度的,这里应该使用新符号
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-CI-Coverage 中没过的测试好像不是我改的内容。 |
std::vector<symbol::DimExpr> shape; | ||
shape.push_back(unique_dim_sym); | ||
return shape; | ||
}(); |
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.
- Meta 函数里的维度是 {1, -1} ,rank 是 2,这里应该改成 {symbol::DimExpr(1), 新符号} ,而不是整体使用 {新符号}
- push_back() 可以替换成 empalce_back()
- 发生了冲突,也顺便解决一下
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.
已修改。
麻烦补充一下单测状态 |
@@ -29,6 +29,7 @@ OP_DECLARE_INFER_SYMBOLIC_SHAPE(FullIntArray) | |||
OP_DECLARE_INFER_SYMBOLIC_SHAPE(Gaussian) | |||
OP_DECLARE_INFER_SYMBOLIC_SHAPE(Randint) | |||
OP_DECLARE_INFER_SYMBOLIC_SHAPE(Randperm) | |||
OP_DECLARE_INFER_SYMBOLIC_SHAPE(ReadFile) | |||
OP_DECLARE_INFER_SYMBOLIC_SHAPE(Seed) | |||
// OP_DECLARE_INFER_SYMBOLIC_SHAPE(ReadFile) |
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.
顺便把这个注释删掉
请问是否需要重新 rerun。 |
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
650 - test_write_python_container (Failed) |
是随机挂问题 |
PR Category
CINN
PR Types
Improvements
Description
添加 read_file 算子符号推导接口。