提交 5f7bd065 编写于 作者: L liuruilong

Merge remote-tracking branch 'upstream/develop' into develop

......@@ -172,22 +172,17 @@ const framework::Program<Dtype, P> Loader<Dtype, P>::Load(
//
DLOG << "n_ops: " << (*c_program->blocks)->n_ops;
//
std::shared_ptr<framework::ProgramDesc> originProgramDesc =
std::make_shared<framework::ProgramDesc>(c_program);
auto originProgramDesc = std::make_shared<framework::ProgramDesc>(c_program);
framework::Program<Dtype, P> program;
program.model_path = dirname;
program.originProgram = originProgramDesc;
std::shared_ptr<framework::Scope> scope =
std::make_shared<framework::Scope>();
auto scope = std::make_shared<framework::Scope>();
program.scope = scope;
originProgramDesc->Block(0);
for (const auto &block : originProgramDesc->Blocks()) {
for (int i = 0; i < block->Vars().size(); ++i) {
std::shared_ptr<framework::VarDesc> var_desc = block->Vars()[i];
// DLOG << "var name-- " << var_desc->Name();
for (auto var_desc : block->Vars()) {
auto var = scope->Var(var_desc->Name());
if (var_desc->Type() == framework::VARTYPE_TYPE_LOD_TENSOR) {
......
......@@ -16,6 +16,7 @@ limitations under the License. */
#include <iostream>
int main(void) {
#ifdef PADDLE_MOBILE_USE_OPENMP
#pragma omp parallel num_threads(2)
{
// int thread_id = omp_get_thread_num();
......@@ -23,5 +24,6 @@ int main(void) {
// std::cout << "Hello, OMP " << thread_id << "/" << nthreads <<
// "\n";
}
#endif
return 0;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册