From 84bbbf7ede7462417a5fe97ae0ff72a55fd20d8e Mon Sep 17 00:00:00 2001 From: liuruilong Date: Sat, 29 Sep 2018 15:47:26 +0800 Subject: [PATCH] update --- src/io/executor.cpp | 6 +++++- src/operators/kernel/cl/conv_kernel.cpp | 1 + src/operators/op_param.h | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/io/executor.cpp b/src/io/executor.cpp index 9803a35ede..0c8fcb2f5e 100644 --- a/src/io/executor.cpp +++ b/src/io/executor.cpp @@ -16,7 +16,6 @@ limitations under the License. */ #include #include #include -#include #include "common/enforce.h" #include "common/log.h" #include "framework/framework.pb-c.h" @@ -27,12 +26,17 @@ limitations under the License. */ #include "framework/program/var_desc.h" #include "framework/scope.h" #include "framework/tensor.h" + #ifdef PADDLE_EXECUTOR_MULTITHREAD #include #include #include "common/threadpool.h" #endif +#ifdef PADDLE_MOBILE_CL +#include "framework/cl/cl_image.h" +#endif + namespace paddle_mobile { using framework::Variable; diff --git a/src/operators/kernel/cl/conv_kernel.cpp b/src/operators/kernel/cl/conv_kernel.cpp index 451f96447e..419eb51f50 100644 --- a/src/operators/kernel/cl/conv_kernel.cpp +++ b/src/operators/kernel/cl/conv_kernel.cpp @@ -28,6 +28,7 @@ bool ConvKernel::Init(ConvParam *param) { template <> void ConvKernel::Compute(const ConvParam ¶m) { + auto kernel = this->cl_helper_.KernelAt(0); size_t global_work_size[3] = {1, 2, 3}; clEnqueueNDRangeKernel(this->cl_helper_.CLCommandQueue(), kernel, 3, NULL, global_work_size, NULL, 0, NULL, NULL); diff --git a/src/operators/op_param.h b/src/operators/op_param.h index ec5904a822..033de08f9f 100644 --- a/src/operators/op_param.h +++ b/src/operators/op_param.h @@ -75,7 +75,7 @@ struct DtypeTensorTrait { typedef framework::Tensor rtype; }; - +#ifdef PADDLE_MOBILE_CL template <> struct DtypeTensorTrait { // This is the type we obtained in variable. @@ -84,6 +84,7 @@ struct DtypeTensorTrait { // or the same type. typedef framework::CLImage rtype; }; +#endif class OpParam { protected: -- GitLab