Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleDetection
提交
3d6ca6ad
P
PaddleDetection
项目概览
PaddlePaddle
/
PaddleDetection
大约 1 年 前同步成功
通知
694
Star
11112
Fork
2696
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
184
列表
看板
标记
里程碑
合并请求
40
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
184
Issue
184
列表
看板
标记
里程碑
合并请求
40
合并请求
40
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
3d6ca6ad
编写于
11月 10, 2017
作者:
Q
qingqing01
提交者:
GitHub
11月 10, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #5484 from qingqing01/cmake_speed
Remove fill_constant_batch_size_like_op.h and clean some operator codes.
上级
aa340671
cceed081
变更
15
显示空白变更内容
内联
并排
Showing
15 changed file
with
10 addition
and
44 deletion
+10
-44
doc/howto/dev/new_op_cn.md
doc/howto/dev/new_op_cn.md
+1
-1
paddle/operators/accuracy_op.h
paddle/operators/accuracy_op.h
+0
-13
paddle/operators/batch_norm_op.cc
paddle/operators/batch_norm_op.cc
+0
-3
paddle/operators/fill_constant_batch_size_like_op.cu
paddle/operators/fill_constant_batch_size_like_op.cu
+0
-1
paddle/operators/fill_constant_batch_size_like_op.h
paddle/operators/fill_constant_batch_size_like_op.h
+3
-4
paddle/operators/fill_zeros_like_op.cu
paddle/operators/fill_zeros_like_op.cu
+0
-1
paddle/operators/fill_zeros_like_op.h
paddle/operators/fill_zeros_like_op.h
+6
-5
paddle/operators/mul_op.cu
paddle/operators/mul_op.cu
+0
-1
paddle/operators/mul_op.h
paddle/operators/mul_op.h
+0
-4
paddle/operators/nccl_op_test.cu
paddle/operators/nccl_op_test.cu
+0
-1
paddle/operators/sequence_concat_op.cu
paddle/operators/sequence_concat_op.cu
+0
-2
paddle/operators/sequence_softmax_op.cu
paddle/operators/sequence_softmax_op.cu
+0
-2
paddle/operators/sequence_softmax_op.h
paddle/operators/sequence_softmax_op.h
+0
-1
paddle/operators/softmax_op.cu
paddle/operators/softmax_op.cu
+0
-1
paddle/operators/softmax_op.h
paddle/operators/softmax_op.h
+0
-4
未找到文件。
doc/howto/dev/new_op_cn.md
浏览文件 @
3d6ca6ad
...
...
@@ -214,7 +214,7 @@ MulOp(const std::string &type, const framework::VariableNameMap &inputs,
```cpp
// if use Eigen unsupported module before include head files
#define EIGEN_USE_GPU
//
#define EIGEN_USE_GPU
namespace ops = paddle::operators;
REGISTER_OP_GPU_KERNEL(mul, ops::MulKernel<paddle::platform::GPUPlace, float>);
...
...
paddle/operators/accuracy_op.h
浏览文件 @
3d6ca6ad
...
...
@@ -14,7 +14,6 @@ limitations under the License. */
#pragma once
#include <algorithm>
#include "paddle/framework/eigen.h"
#include "paddle/framework/op_registry.h"
namespace
paddle
{
...
...
@@ -22,18 +21,6 @@ namespace operators {
using
Tensor
=
framework
::
Tensor
;
template
<
typename
T
,
int
MajorType
=
Eigen
::
RowMajor
,
typename
IndexType
=
Eigen
::
DenseIndex
>
using
EigenMatrix
=
framework
::
EigenMatrix
<
T
,
MajorType
,
IndexType
>
;
template
<
typename
T
,
int
MajorType
=
Eigen
::
RowMajor
,
typename
IndexType
=
Eigen
::
DenseIndex
>
using
EigenVector
=
framework
::
EigenVector
<
T
,
MajorType
,
IndexType
>
;
template
<
typename
T
,
int
MajorType
=
Eigen
::
RowMajor
,
typename
IndexType
=
Eigen
::
DenseIndex
>
using
EigenScalar
=
framework
::
EigenScalar
<
T
,
MajorType
,
IndexType
>
;
template
<
typename
Place
,
typename
T
>
class
AccuracyKernel
:
public
framework
::
OpKernel
<
T
>
{
public:
...
...
paddle/operators/batch_norm_op.cc
浏览文件 @
3d6ca6ad
...
...
@@ -19,9 +19,6 @@ namespace operators {
using
Tensor
=
framework
::
Tensor
;
using
LoDTensor
=
framework
::
LoDTensor
;
template
<
typename
T
,
int
MajorType
=
Eigen
::
RowMajor
,
typename
IndexType
=
Eigen
::
DenseIndex
>
using
EigenMatrix
=
framework
::
EigenMatrix
<
T
,
MajorType
,
IndexType
>
;
template
<
typename
T
>
using
EigenArrayMap
=
...
...
paddle/operators/fill_constant_batch_size_like_op.cu
浏览文件 @
3d6ca6ad
...
...
@@ -12,7 +12,6 @@
See the License for the specific language governing permissions and
limitations under the License. */
#define EIGEN_USE_GPU
#include "paddle/framework/op_registry.h"
#include "paddle/operators/fill_constant_batch_size_like_op.h"
...
...
paddle/operators/fill_constant_batch_size_like_op.h
浏览文件 @
3d6ca6ad
...
...
@@ -13,8 +13,8 @@ See the License for the specific language governing permissions and
limitations under the License. */
#pragma once
#include "paddle/framework/eigen.h"
#include "paddle/framework/op_registry.h"
#include "paddle/operators/math/math_function.h"
namespace
paddle
{
namespace
operators
{
...
...
@@ -27,9 +27,8 @@ class FillConstantBatchSizeLikeOpKernel : public framework::OpKernel<T> {
out
->
mutable_data
<
T
>
(
ctx
.
GetPlace
());
auto
value
=
ctx
.
Attr
<
float
>
(
"value"
);
auto
out_eigen
=
framework
::
EigenVector
<
T
>::
Flatten
(
*
out
);
auto
place
=
ctx
.
GetEigenDevice
<
Place
>
();
out_eigen
.
device
(
place
)
=
out_eigen
.
constant
(
static_cast
<
T
>
(
value
));
math
::
SetConstant
<
Place
,
T
>
setter
;
setter
(
ctx
.
device_context
(),
out
,
static_cast
<
T
>
(
value
));
}
};
...
...
paddle/operators/fill_zeros_like_op.cu
浏览文件 @
3d6ca6ad
...
...
@@ -12,7 +12,6 @@
See the License for the specific language governing permissions and
limitations under the License. */
#define EIGEN_USE_GPU
#include "paddle/framework/op_registry.h"
#include "paddle/operators/fill_zeros_like_op.h"
...
...
paddle/operators/fill_zeros_like_op.h
浏览文件 @
3d6ca6ad
...
...
@@ -13,8 +13,8 @@ See the License for the specific language governing permissions and
limitations under the License. */
#pragma once
#include "paddle/framework/eigen.h"
#include "paddle/framework/op_registry.h"
#include "paddle/operators/math/math_function.h"
namespace
paddle
{
namespace
operators
{
...
...
@@ -23,10 +23,11 @@ template <typename Place, typename T>
class
FillZerosLikeKernel
:
public
framework
::
OpKernel
<
T
>
{
public:
void
Compute
(
const
framework
::
ExecutionContext
&
context
)
const
override
{
auto
*
output
=
context
.
Output
<
framework
::
Tensor
>
(
"Y"
);
output
->
mutable_data
<
T
>
(
context
.
GetPlace
());
auto
t
=
framework
::
EigenVector
<
T
>::
Flatten
(
*
output
);
t
.
device
(
context
.
GetEigenDevice
<
Place
>
())
=
t
.
constant
(
static_cast
<
T
>
(
0
));
auto
*
out
=
context
.
Output
<
framework
::
Tensor
>
(
"Y"
);
out
->
mutable_data
<
T
>
(
context
.
GetPlace
());
math
::
SetConstant
<
Place
,
T
>
setter
;
setter
(
context
.
device_context
(),
out
,
static_cast
<
T
>
(
0
));
}
};
...
...
paddle/operators/mul_op.cu
浏览文件 @
3d6ca6ad
...
...
@@ -12,7 +12,6 @@
See the License for the specific language governing permissions and
limitations under the License. */
#define EIGEN_USE_GPU
#include "paddle/operators/mul_op.h"
namespace
ops
=
paddle
::
operators
;
...
...
paddle/operators/mul_op.h
浏览文件 @
3d6ca6ad
...
...
@@ -16,16 +16,12 @@
#include "paddle/operators/math/math_function.h"
#include "paddle/framework/eigen.h"
#include "paddle/framework/op_registry.h"
namespace
paddle
{
namespace
operators
{
using
Tensor
=
framework
::
Tensor
;
template
<
typename
T
,
int
MajorType
=
Eigen
::
RowMajor
,
typename
IndexType
=
Eigen
::
DenseIndex
>
using
EigenMatrix
=
framework
::
EigenMatrix
<
T
,
MajorType
,
IndexType
>
;
template
<
typename
Place
,
typename
T
>
class
MulKernel
:
public
framework
::
OpKernel
<
T
>
{
...
...
paddle/operators/nccl_op_test.cu
浏览文件 @
3d6ca6ad
...
...
@@ -26,7 +26,6 @@
#include "paddle/framework/op_registry.h"
#include "paddle/framework/program_desc.h"
#include "paddle/framework/var_desc.h"
#include "paddle/operators/math/math_function.h"
#include "paddle/operators/nccl/nccl_gpu_common.h"
#include "paddle/platform/device_context.h"
#include "paddle/platform/enforce.h"
...
...
paddle/operators/sequence_concat_op.cu
浏览文件 @
3d6ca6ad
...
...
@@ -12,8 +12,6 @@ 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. */
#define EIGEN_USE_GPU
#include "paddle/operators/sequence_concat_op.h"
namespace
ops
=
paddle
::
operators
;
...
...
paddle/operators/sequence_softmax_op.cu
浏览文件 @
3d6ca6ad
...
...
@@ -12,8 +12,6 @@ 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. */
#define EIGEN_USE_GPU
#include "paddle/operators/sequence_softmax_op.h"
namespace
ops
=
paddle
::
operators
;
...
...
paddle/operators/sequence_softmax_op.h
浏览文件 @
3d6ca6ad
...
...
@@ -14,7 +14,6 @@ limitations under the License. */
#pragma once
#include "paddle/framework/eigen.h"
#include "paddle/framework/op_registry.h"
#include "paddle/operators/math/softmax.h"
...
...
paddle/operators/softmax_op.cu
浏览文件 @
3d6ca6ad
...
...
@@ -12,7 +12,6 @@
See the License for the specific language governing permissions and
limitations under the License. */
#define EIGEN_USE_GPU
#include "paddle/operators/softmax_op.h"
namespace
ops
=
paddle
::
operators
;
...
...
paddle/operators/softmax_op.h
浏览文件 @
3d6ca6ad
...
...
@@ -13,7 +13,6 @@ See the License for the specific language governing permissions and
limitations under the License. */
#pragma once
#include "paddle/framework/eigen.h"
#include "paddle/framework/op_registry.h"
#include "paddle/operators/math/softmax.h"
...
...
@@ -21,9 +20,6 @@ namespace paddle {
namespace
operators
{
using
Tensor
=
framework
::
Tensor
;
template
<
typename
T
,
int
MajorType
=
Eigen
::
RowMajor
,
typename
IndexType
=
Eigen
::
DenseIndex
>
using
EigenMatrix
=
framework
::
EigenMatrix
<
T
,
MajorType
,
IndexType
>
;
template
<
typename
Place
,
typename
T
>
class
SoftmaxKernel
:
public
framework
::
OpKernel
<
T
>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录