-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[CINN]【Infer Symbolic Shape 】Add pyramid_hash op #67951
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提交成功,感谢你对开源项目的贡献! |
Title和Description描述太简陋,Description中需要加上Pcard-67164 |
paddle/fluid/pir/dialect/operator/interface/infer_symbolic_shape/multiary_infer_sym.cc
Outdated
Show resolved
Hide resolved
paddle/fluid/pir/dialect/operator/interface/infer_symbolic_shape/multiary_infer_sym.cc
Outdated
Show resolved
Hide resolved
// Set the output shapes | ||
std::vector<symbol::DimExpr> out_shape = {infer_context->GetNextSymName(), | ||
symbol::DimExpr(num_emb)}; | ||
std::vector<symbol::DimExpr> drop_pos = {infer_context->GetNextSymName(), 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.
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.
symbol::ShapeOrDataDimExprs{symbol::TensorShapeOrDataDimExprs(drop_pos)}); | ||
infer_context->SetShapeOrDataForValue( | ||
op->result(2), | ||
symbol::ShapeOrDataDimExprs{symbol::TensorShapeOrDataDimExprs(x_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.
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.
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
添加pyramid_hash 算子符号推导接口
本算子有单测,但只含unnitest
Pcard-67164