Skip to content

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 force-pushed the inf_with_fleet_exe branch from 961b25c to baf21db Compare January 10, 2022 00:38
@FeixLiu FeixLiu marked this pull request as ready for review January 10, 2022 02:32
@FeixLiu FeixLiu force-pushed the inf_with_fleet_exe branch from bd510e9 to 3466c7c Compare January 10, 2022 02:58

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

3 participants