-
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
【paddle.fleet】fix sparse load #27680
Conversation
Thanks for your contribution! |
paddle/fluid/framework/lod_tensor.cc
Outdated
@@ -267,6 +267,36 @@ void SerializeToStream(std::ostream &os, const LoDTensor &tensor, | |||
TensorToStream(os, static_cast<Tensor>(tensor), dev_ctx); | |||
} | |||
|
|||
void DeserializeFromStream(std::istream &is, LoDTensor *tensor, | |||
const platform::DeviceContext &dev_ctx, | |||
const int64_t &node_index, const int64_t &node_num, |
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.
what's the meaning node_index
and node_num
?
paddle/fluid/framework/tensor_util.h
Outdated
@@ -78,6 +78,10 @@ void TensorFromStream(std::istream& is, Tensor* tensor, | |||
void TensorFromStream(std::istream& is, Tensor* tensor, | |||
const platform::DeviceContext& dev_ctx, | |||
const size_t& seek, const std::vector<int64_t>& shape); | |||
void TensorFromStream(std::istream& is, Tensor* tensor, |
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 |
* add sparse tensor load method
PR types
New features,Bug fixes
PR changes
OPs,Others
Describe
修复了重构PS后, 参数服务器加载模型的问题