Skip to content

init code gen#17905

Merged
Superjomn merged 10 commits intoPaddlePaddle:incubate/litefrom
Superjomn:lite/gencode-init
Jun 10, 2019
Merged

init code gen#17905
Superjomn merged 10 commits intoPaddlePaddle:incubate/litefrom
Superjomn:lite/gencode-init

Conversation

@Superjomn
Copy link
Contributor

@Superjomn Superjomn commented Jun 6, 2019

This PR supports to generate c++ code for an optimized model.

Resize(dim);
auto* dst = mutable_data<DType>(Target);
CopySync<Target>(dst, data, dim.production() * sizeof(DType),
IoDirection::HtoD);
Copy link

Choose a reason for hiding this comment

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

这里默认的copy direction是IoDirection::HtoD,要是需要调用Assign完成HtoH或者DtoH的怎么办?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Assign 只用于 host to device 的设置

}
if (scope) {
delete scope;
}
Copy link

Choose a reason for hiding this comment

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

Scope::~Scope实现为空,kids为std::list<Scope*>,构造函数里的raw_exe_scope_没有释放

Copy link

@sangoly sangoly left a comment

Choose a reason for hiding this comment

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

LGTM

@Superjomn Superjomn merged commit 01e1cda into PaddlePaddle:incubate/lite Jun 10, 2019
@Superjomn Superjomn deleted the lite/gencode-init branch June 10, 2019 07:56
@Superjomn Superjomn restored the lite/gencode-init branch June 10, 2019 08:36
Superjomn added a commit that referenced this pull request Jul 1, 2019
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.

2 participants