Skip to content
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

[fleet_executor] framework for big model inference #38795

Merged
merged 14 commits into from
Jan 10, 2022

Conversation

FeixLiu
Copy link
Contributor

@FeixLiu FeixLiu commented Jan 7, 2022

PR types

Others

PR changes

Others

Describe

Framework for big model inference.
Adding load program and params part.

@paddle-bot-old
Copy link

paddle-bot-old bot commented Jan 7, 2022

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@FeixLiu FeixLiu marked this pull request as draft January 7, 2022 10:08
@FeixLiu FeixLiu marked this pull request as ready for review January 10, 2022 02:32

bool DistModel::Init() {
/* TODO(fleet exe dev): implement this funct */
place_ = paddle::platform::CUDAPlace(config_.device_id);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不一定是GPU的吧,可能为CPU的

for (auto *var : global_block->AllVars()) {
if (IsPersistable(var)) {
VLOG(3) << "persistable variable's name: " << var->Name();
framework::VarDesc *new_var = load_block->Var(var->Name());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个后面可以抽成一个函数

std::sort(params.begin(), params.end());
// append just the load_combine op
framework::OpDesc *op = load_block->AppendOp();
op->SetType("load_combine");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

预测模型都是combine load的吗

Comment on lines +41 to +49
if (!PrepareScope()) {
return false;
}
if (!PrepareProgram()) {
return false;
}
if (!CommInit()) {
return false;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这可以直接组成表达式吧,不用一个个判断

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

慢慢改,提个框架😂

Copy link
Contributor

@wangxicoding wangxicoding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wangxicoding wangxicoding merged commit ededcda into PaddlePaddle:develop Jan 10, 2022
@FeixLiu FeixLiu deleted the inf_with_fleet_exe branch March 2, 2022 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants