diff --git a/src/io/executor.cpp b/src/io/executor.cpp index 9803a35edeb444ac74ffd8feac2b9d57cb80b479..0c8fcb2f5ea8663a6deec815adfa82faf676fb6e 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 451f96447e458524e698f5068bba73f763b236b2..419eb51f5053bd93177dc8c1f9613f5d512ce79a 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 ec5904a8225f4f64c5d55a93888052f0f500f629..033de08f9f959edfbd6e88de3c2202911515548c 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: