提交 d2a63e5a 编写于 作者: H Huie 提交者: zp7

1.add flatten2 kernel not implemented. 2.add density_prior_box kernel not implemented (#1781)

上级 ba30ff10
......@@ -127,6 +127,9 @@ LOAD_OP2(transpose2, CPU, GPU_CL);
#ifdef PRIORBOX_OP
LOAD_OP2(prior_box, CPU, GPU_CL);
#endif
#ifdef DENSITY_PRIORBOX_OP
LOAD_OP2(density_prior_box, CPU, GPU_CL);
#endif
#ifdef FUSION_CONVADDRELU_OP
LOAD_OP3(fusion_conv_add_relu, CPU, GPU_CL, FPGA);
LOAD_FUSION_MATCHER(fusion_conv_add_relu);
......@@ -158,7 +161,9 @@ LOAD_OP1(prelu, CPU);
#endif
#ifdef FLATTEN_OP
LOAD_OP1(flatten, CPU);
LOAD_OP1(flatten2, CPU);
#endif
#ifdef FLATTEN2_OP
LOAD_OP2(flatten2, CPU, GPU_CL);
#endif
#ifdef FUSION_CONVBNADDRELU_OP
LOAD_OP3(fusion_conv_bn_add_relu, CPU, GPU_CL, FPGA);
......
/* Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#ifdef FLATTEN2_OP
#include "operators/flatten2_op.h"
namespace paddle_mobile {
namespace operators {
template <typename DeviceType, typename T>
void Flatten2Op<DeviceType, T>::InferShape() const {}
} // namespace operators
} // namespace paddle_mobile
namespace ops = paddle_mobile::operators;
#ifdef PADDLE_MOBILE_CL
REGISTER_OPERATOR_CL(flatten2, ops::Flatten2Op);
#endif
#endif
/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#ifdef FLATTEN2_OP
#pragma once
#include <string>
#include <vector>
#include "framework/operator.h"
#include "operators/kernel/flatten2_kernel.h"
#include "operators/op_param.h"
namespace paddle_mobile {
namespace operators {
DECLARE_OPERATOR(Flatten2, FlattenParam, Flatten2Kernel);
} // namespace operators
} // namespace paddle_mobile
#endif
__kernel void density_prior_box(){
}
\ No newline at end of file
__kernel void flatten2(){
}
\ No newline at end of file
/* Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#ifdef DENSITY_PRIORBOX_OP
#include <operators/kernel/prior_box_kernel.h>
namespace paddle_mobile {
namespace operators {
template <>
bool DensityPriorBoxKernel<GPU_CL, float>::Init(
paddle_mobile::operators::DensityPriorBoxParam<paddle_mobile::GPU_CL>
*param) {
this->cl_helper_.AddKernel("density_prior_box",
"density_prior_box_kernel.cl");
return true;
}
template <>
void DensityPriorBoxKernel<GPU_CL, float>::Compute(
const paddle_mobile::operators::DensityPriorBoxParam<paddle_mobile::GPU_CL>
&param) {}
} // namespace operators
} // namespace paddle_mobile
#endif
/* Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#ifdef FLATTEN2_OP
#include "operators/kernel/flatten2_kernel.h"
namespace paddle_mobile {
namespace operators {
template <>
bool Flatten2Kernel<GPU_CL, float>::Init(
paddle_mobile::operators::FlattenParam<paddle_mobile::GPU_CL> *param) {
this->cl_helper_.AddKernel("flatten2", "flatten2_kernel.cl");
return true;
}
template <>
void Flatten2Kernel<GPU_CL, float>::Compute(
const paddle_mobile::operators::FlattenParam<paddle_mobile::GPU_CL>
&param) {}
} // namespace operators
} // namespace paddle_mobile
#endif
/* Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
//
// Created by hujie09 on 2019-07-31.
//
#ifdef FLATTEN2_OP
#include <operators/op_param.h>
#include "framework/operator.h"
namespace paddle_mobile {
namespace operators {
DECLARE_KERNEL(Flatten2, FlattenParam)
}
} // namespace paddle_mobile
#endif // FLATTEN2_KERNEL
......@@ -95,4 +95,7 @@ REGISTER_OPERATOR_CPU(density_prior_box, ops::DensityPriorBoxOp);
#ifdef PRIORBOX_OP
REGISTER_OPERATOR_CL(prior_box, ops::PriorBoxOp);
#endif // PRIORBOX_OP
#ifdef DENSITY_PRIORBOX_OP
REGISTER_OPERATOR_CL(density_prior_box, ops::DensityPriorBoxOp);
#endif // DENSITY_PRIORBOX_OP
#endif // PADDLE_MOBILE_CL
......@@ -237,6 +237,7 @@ if (CON GREATER -1)
set(BOXCODER_OP ON)
set(MULTICLASSNMS_OP ON)
set(FLATTEN_OP ON)
set(FLATTEN2_OP ON)
set(SPLIT_OP ON)
set(SHAPE_OP ON)
......@@ -328,6 +329,7 @@ if(NOT FOUND_MATCH)
set(BILINEAR_INTERP_OP ON)
set(SPLIT_OP ON)
set(FLATTEN_OP ON)
set(FLATTEN2_OP ON)
set(SHAPE_OP ON)
set(ELEMENTWISEMUL_OP ON)
set(SUM_OP ON)
......@@ -555,6 +557,10 @@ if (FLATTEN_OP)
add_definitions(-DFLATTEN_OP)
endif()
if (FLATTEN2_OP)
add_definitions(-DFLATTEN2_OP)
endif()
if (SPLIT_OP)
add_definitions(-DSPLIT_OP)
endif()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册