-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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.200】[BUAA] Addgather_tree #67625
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
// } | ||
bool GatherTreeOpInferSymbolicShape( | ||
pir::Operation *op, pir::InferSymbolicShapeContext *infer_context) { | ||
const symbol::ShapeOrDataDimExprs &ids_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.
命名不规范,ids_shape_or_data
"The shape of Input(Parents) must be same with the " | ||
"shape of Input(Ids).")); | ||
|
||
infer_context->SetShapeOrDataForValue(op->result(0), ids_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.
这里直接把operand value的shape和data数据都传出去了,一般data区的数据需要抛弃掉。麻烦取出shape数据然后重新构造一个shapeordata数据。
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
#66444
添加gather_tree算子符号推导接口