-
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
[Semi-Auto] Replace the pointers in reshape-like spmd rule with smart pointers. #59101
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
|
||
void Split::set_input(DimTrans* dim) { input_dim_trans_ = dim; } | ||
void Split::set_input(const std::shared_ptr<DimTrans>& dim) { |
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.
shared_ptr类型的参数,是否有必要使用引用,一般建议使用值传参即可。
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.
Done
const std::set<int64_t>& sharded_input_dims) { | ||
std::shared_ptr<DimTrans> GetDimTrans( | ||
const std::shared_ptr<DimTrans>& dim_trans, | ||
std::vector<std::vector<bool>>* shardable, |
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.
Done
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
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
… pointers. (PaddlePaddle#59101) * use smart pointer in reshape-like spmd rules * remove ununsed code and comments * replace the reference of shared_ptr in function arg list * modify the arg order in GetDimTrans function
PR types
Others
PR changes
Others
Description
Pcard-76459
Replace the pointers in reshape-like spmd rule with smart pointers.