提交 f04dbebb 编写于 作者: L liuruilong

format files

上级 89d92093
......@@ -17,8 +17,8 @@ limitations under the License. */
#pragma once
#include <string>
#include <vector>
#include <utility>
#include <vector>
#include "framework/operator.h"
#include "framework/program/program-optimize/fusion_op_register.h"
#include "operators/kernel/conv_add_add_prelu_kernel.h"
......
......@@ -19,8 +19,8 @@ limitations under the License. */
#include <vector>
#include "framework/operator.h"
#include "framework/program/program-optimize/fusion_op_register.h"
#include "operators/op_param.h"
#include "operators/kernel/conv_add_kernel.h"
#include "operators/op_param.h"
namespace paddle_mobile {
namespace operators {
......
......@@ -39,8 +39,7 @@ class FusionConvAddPReluOpMatcher : public framework::FusionOpMatcher {
std::vector<std::shared_ptr<framework::Node>> *removed_nodes) {
node->Folder(node_.Depth(), Type(),
{{G_OP_TYPE_ELEMENTWISE_ADD, {{"Y", "Y"}}},
{G_OP_TYPE_PRELU, {{"Alpha", "Alpha"}}}
},
{G_OP_TYPE_PRELU, {{"Alpha", "Alpha"}}}},
removed_nodes);
}
std::string Type() { return G_OP_TYPE_FUSION_CONV_ADD_PRELU; }
......
......@@ -17,12 +17,12 @@ limitations under the License. */
#pragma once
#include <string>
#include <vector>
#include <utility>
#include <vector>
#include "framework/operator.h"
#include "framework/program/program-optimize/fusion_op_register.h"
#include "operators/op_param.h"
#include "operators/kernel/conv_bn_add_relu_kernel.h"
#include "operators/op_param.h"
namespace paddle_mobile {
namespace operators {
......
......@@ -20,8 +20,8 @@ limitations under the License. */
#include <vector>
#include "framework/operator.h"
#include "framework/program/program-optimize/fusion_op_register.h"
#include "operators/op_param.h"
#include "operators/kernel/dwconv_bn_relu_kernel.h"
#include "operators/op_param.h"
namespace paddle_mobile {
namespace operators {
......
......@@ -17,9 +17,9 @@ limitations under the License. */
#pragma once
#include <string>
#include "operators/op_param.h"
#include "framework/operator.h"
#include "operators/kernel/im2sequence_kernel.h"
#include "operators/op_param.h"
namespace paddle_mobile {
namespace operators {
......
......@@ -49,11 +49,14 @@ void ElementwiseAddKernel<GPU_CL, float>::Compute(
cl_mem input_image = input->GetCLImage();
cl_mem bias_image = bias->GetCLImage();
cl_mem output_image = output->GetCLImage();
status = clSetKernelArg(kernel, 0, sizeof(cl_mem), reinterpret_cast<void *>(&input_image));
status = clSetKernelArg(kernel, 0, sizeof(cl_mem),
reinterpret_cast<void *>(&input_image));
CL_CHECK_ERRORS(status);
status = clSetKernelArg(kernel, 1, sizeof(cl_mem), reinterpret_cast<void *>(&bias_image));
status = clSetKernelArg(kernel, 1, sizeof(cl_mem),
reinterpret_cast<void *>(&bias_image));
CL_CHECK_ERRORS(status);
status = clSetKernelArg(kernel, 2, sizeof(cl_mem), reinterpret_cast<void *>(&output_image));
status = clSetKernelArg(kernel, 2, sizeof(cl_mem),
reinterpret_cast<void *>(&output_image));
CL_CHECK_ERRORS(status);
int width = input->ImageWidth();
int height = input->ImageHeight();
......@@ -67,13 +70,17 @@ void ElementwiseAddKernel<GPU_CL, float>::Compute(
cl_mem bias_image = bias->GetCLImage();
cl_mem output_image = output->GetCLImage();
int tensor_w = input->dims()[3];
status = clSetKernelArg(kernel, 0, sizeof(cl_mem), reinterpret_cast<void *>(&input_image));
status = clSetKernelArg(kernel, 0, sizeof(cl_mem),
reinterpret_cast<void *>(&input_image));
CL_CHECK_ERRORS(status);
status = clSetKernelArg(kernel, 1, sizeof(cl_mem), reinterpret_cast<void *>(&bias_image));
status = clSetKernelArg(kernel, 1, sizeof(cl_mem),
reinterpret_cast<void *>(&bias_image));
CL_CHECK_ERRORS(status);
status = clSetKernelArg(kernel, 2, sizeof(cl_mem), reinterpret_cast<void *>(&output_image));
status = clSetKernelArg(kernel, 2, sizeof(cl_mem),
reinterpret_cast<void *>(&output_image));
CL_CHECK_ERRORS(status);
status = clSetKernelArg(kernel, 3, sizeof(cl_int), reinterpret_cast<void *>(&tensor_w));
status = clSetKernelArg(kernel, 3, sizeof(cl_int),
reinterpret_cast<void *>(&tensor_w));
CL_CHECK_ERRORS(status);
int width = input->ImageWidth();
int height = input->ImageHeight();
......
......@@ -14,8 +14,8 @@ limitations under the License. */
#ifdef POOL_OP
#include <vector>
#include "operators/pool_op.h"
#include <vector>
#include "framework/op_proto_maker.h"
#include "framework/op_registry.h"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册