提交 de058d4c 编写于 作者: L liuruilong

update

上级 093612fe
...@@ -16,7 +16,6 @@ limitations under the License. */ ...@@ -16,7 +16,6 @@ limitations under the License. */
#include <operators/math/gemm.h> #include <operators/math/gemm.h>
#include <algorithm> #include <algorithm>
#include <vector> #include <vector>
#include <framework/cl/cl_image.h>
#include "common/enforce.h" #include "common/enforce.h"
#include "common/log.h" #include "common/log.h"
#include "framework/framework.pb-c.h" #include "framework/framework.pb-c.h"
...@@ -27,12 +26,17 @@ limitations under the License. */ ...@@ -27,12 +26,17 @@ limitations under the License. */
#include "framework/program/var_desc.h" #include "framework/program/var_desc.h"
#include "framework/scope.h" #include "framework/scope.h"
#include "framework/tensor.h" #include "framework/tensor.h"
#ifdef PADDLE_EXECUTOR_MULTITHREAD #ifdef PADDLE_EXECUTOR_MULTITHREAD
#include <queue> #include <queue>
#include <utility> #include <utility>
#include "common/threadpool.h" #include "common/threadpool.h"
#endif #endif
#ifdef PADDLE_MOBILE_CL
#include "framework/cl/cl_image.h"
#endif
namespace paddle_mobile { namespace paddle_mobile {
using framework::Variable; using framework::Variable;
......
...@@ -28,6 +28,7 @@ bool ConvKernel<GPU_CL, float>::Init(ConvParam<GPU_CL> *param) { ...@@ -28,6 +28,7 @@ bool ConvKernel<GPU_CL, float>::Init(ConvParam<GPU_CL> *param) {
template <> template <>
void ConvKernel<GPU_CL, float>::Compute(const ConvParam<GPU_CL> &param) { void ConvKernel<GPU_CL, float>::Compute(const ConvParam<GPU_CL> &param) {
auto kernel = this->cl_helper_.KernelAt(0); auto kernel = this->cl_helper_.KernelAt(0);
size_t global_work_size[3] = {1, 2, 3}; size_t global_work_size[3] = {1, 2, 3};
clEnqueueNDRangeKernel(this->cl_helper_.CLCommandQueue(), kernel, 3, NULL, global_work_size, NULL, 0, NULL, NULL); clEnqueueNDRangeKernel(this->cl_helper_.CLCommandQueue(), kernel, 3, NULL, global_work_size, NULL, 0, NULL, NULL);
......
...@@ -75,7 +75,7 @@ struct DtypeTensorTrait<GPU_MALI> { ...@@ -75,7 +75,7 @@ struct DtypeTensorTrait<GPU_MALI> {
typedef framework::Tensor rtype; typedef framework::Tensor rtype;
}; };
#ifdef PADDLE_MOBILE_CL
template <> template <>
struct DtypeTensorTrait<GPU_CL> { struct DtypeTensorTrait<GPU_CL> {
// This is the type we obtained in variable. // This is the type we obtained in variable.
...@@ -84,6 +84,7 @@ struct DtypeTensorTrait<GPU_CL> { ...@@ -84,6 +84,7 @@ struct DtypeTensorTrait<GPU_CL> {
// or the same type. // or the same type.
typedef framework::CLImage rtype; typedef framework::CLImage rtype;
}; };
#endif
class OpParam { class OpParam {
protected: protected:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册