diff --git a/src/framework/executor.cpp b/src/framework/executor.cpp index 3716e8d5dff81b65b514978fec4085e17f4eaebe..27052de2fd820ddb9c220b3d8230982878620d02 100644 --- a/src/framework/executor.cpp +++ b/src/framework/executor.cpp @@ -908,10 +908,14 @@ void Executor::InitMemory() { for (const auto &var_desc : block->Vars()) { auto var = program_.scope->Var(var_desc->Name()); if (var_desc->Persistable()) { - auto cl_image = var->template GetMutable(); + CLImage *cl_image = nullptr; if (var_desc->Name() == "feed" || var_desc->Name() == "fetch") { + var->template GetMutable(); continue; + } else { + cl_image = var->template GetMutable(); } + char *origin_data = Get_binary_data(program_.model_path + "/" + var_desc->Name()); char *data = origin_data; @@ -966,9 +970,12 @@ void Executor::InitCombineMemory() { for (const auto &var_desc : block->Vars()) { auto var = program_.scope->Var(var_desc->Name()); if (var_desc->Persistable()) { - auto cl_image = var->template GetMutable(); + CLImage *cl_image = nullptr; if (var_desc->Name() == "feed" || var_desc->Name() == "fetch") { + var->template GetMutable(); continue; + } else { + cl_image = var->template GetMutable(); } cl_context context = program_.scope->GetCLScpoe()->Context();