未验证 提交 c6d366c2 编写于 作者: J Jiaying Zhao 提交者: GitHub

fix load_when_predict mode in opencl (#1619)

* optimize GPU conv performance and structure

* add CL macro for test_conv_gpu

* fix build failure

* change funtion name

* change funtion name

* fix load_when_predict mode in opencl
上级 cf542116
...@@ -715,14 +715,14 @@ void Executor<GPU_CL, float>::InitNoPersistableMemory( ...@@ -715,14 +715,14 @@ void Executor<GPU_CL, float>::InitNoPersistableMemory(
for (const auto &var_desc : block->Vars()) { for (const auto &var_desc : block->Vars()) {
auto var = program_.scope->Var(var_desc->Name()); auto var = program_.scope->Var(var_desc->Name());
auto cl_image = var->template GetMutable<CLImage>();
if (var_desc->Persistable()) { if (var_desc->Persistable()) {
if (var_desc->Name() == "feed" || var_desc->Name() == "fetch") { if (var_desc->Name() == "feed" || var_desc->Name() == "fetch") {
var->template GetMutable<framework::LoDTensorArray>();
continue; continue;
} }
} else { } else {
if (var_desc->Type() == VARTYPE_TYPE_LOD_TENSOR) { if (var_desc->Type() == VARTYPE_TYPE_LOD_TENSOR) {
auto cl_image = var->template GetMutable<CLImage>();
cl_context context = program_.scope->GetCLScpoe()->Context(); cl_context context = program_.scope->GetCLScpoe()->Context();
cl_command_queue command_queue = cl_command_queue command_queue =
program_.scope->GetCLScpoe()->CommandQueue(); program_.scope->GetCLScpoe()->CommandQueue();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册