Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
9567cbd7
P
Paddle
项目概览
PaddlePaddle
/
Paddle
1 年多 前同步成功
通知
2302
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
9567cbd7
编写于
6月 11, 2021
作者:
L
liuyuhui
提交者:
GitHub
6月 11, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[cherry-pick 2.1.1]2.1/fix concat (#33383)
* add unit8 for concat (#32850) * add bool type for tril api (#33402)
上级
14440905
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
32 addition
and
15 deletion
+32
-15
paddle/fluid/operators/concat_op.cc
paddle/fluid/operators/concat_op.cc
+4
-2
paddle/fluid/operators/concat_op.cu.cc
paddle/fluid/operators/concat_op.cu.cc
+4
-2
paddle/fluid/operators/reduce_ops/reduce_mean_op.cc
paddle/fluid/operators/reduce_ops/reduce_mean_op.cc
+4
-1
paddle/fluid/operators/reduce_ops/reduce_mean_op.cu
paddle/fluid/operators/reduce_ops/reduce_mean_op.cu
+2
-1
paddle/fluid/operators/reduce_ops/reduce_mean_op.part.cu
paddle/fluid/operators/reduce_ops/reduce_mean_op.part.cu
+2
-1
paddle/fluid/operators/reduce_ops/reduce_sum_op.cc
paddle/fluid/operators/reduce_ops/reduce_sum_op.cc
+5
-2
paddle/fluid/operators/reduce_ops/reduce_sum_op.cu
paddle/fluid/operators/reduce_ops/reduce_sum_op.cu
+2
-1
paddle/fluid/operators/reduce_ops/reduce_sum_op.part.cu
paddle/fluid/operators/reduce_ops/reduce_sum_op.part.cu
+2
-1
paddle/fluid/operators/tril_triu_op.cc
paddle/fluid/operators/tril_triu_op.cc
+3
-1
paddle/fluid/operators/tril_triu_op.cu
paddle/fluid/operators/tril_triu_op.cu
+2
-1
python/paddle/tensor/creation.py
python/paddle/tensor/creation.py
+1
-1
python/paddle/tensor/manipulation.py
python/paddle/tensor/manipulation.py
+1
-1
未找到文件。
paddle/fluid/operators/concat_op.cc
浏览文件 @
9567cbd7
...
...
@@ -233,7 +233,8 @@ REGISTER_OP_CPU_KERNEL(
ops
::
ConcatKernel
<
paddle
::
platform
::
CPUDeviceContext
,
int64_t
>
,
ops
::
ConcatKernel
<
paddle
::
platform
::
CPUDeviceContext
,
paddle
::
platform
::
float16
>
,
ops
::
ConcatKernel
<
paddle
::
platform
::
CPUDeviceContext
,
int
>
);
ops
::
ConcatKernel
<
paddle
::
platform
::
CPUDeviceContext
,
int
>
,
ops
::
ConcatKernel
<
paddle
::
platform
::
CPUDeviceContext
,
uint8_t
>
);
REGISTER_OP_CPU_KERNEL
(
concat_grad
,
ops
::
ConcatGradKernel
<
paddle
::
platform
::
CPUDeviceContext
,
double
>
,
...
...
@@ -242,4 +243,5 @@ REGISTER_OP_CPU_KERNEL(
ops
::
ConcatGradKernel
<
paddle
::
platform
::
CPUDeviceContext
,
int64_t
>
,
ops
::
ConcatGradKernel
<
paddle
::
platform
::
CPUDeviceContext
,
paddle
::
platform
::
float16
>
,
ops
::
ConcatGradKernel
<
paddle
::
platform
::
CPUDeviceContext
,
int
>
);
ops
::
ConcatGradKernel
<
paddle
::
platform
::
CPUDeviceContext
,
int
>
,
ops
::
ConcatKernel
<
paddle
::
platform
::
CPUDeviceContext
,
uint8_t
>
);
paddle/fluid/operators/concat_op.cu.cc
浏览文件 @
9567cbd7
...
...
@@ -23,7 +23,8 @@ REGISTER_OP_CUDA_KERNEL(
ops
::
ConcatKernel
<
paddle
::
platform
::
CUDADeviceContext
,
bool
>
,
ops
::
ConcatKernel
<
paddle
::
platform
::
CUDADeviceContext
,
plat
::
float16
>
,
ops
::
ConcatKernel
<
paddle
::
platform
::
CUDADeviceContext
,
int64_t
>
,
ops
::
ConcatKernel
<
paddle
::
platform
::
CUDADeviceContext
,
int
>
);
ops
::
ConcatKernel
<
paddle
::
platform
::
CUDADeviceContext
,
int
>
,
ops
::
ConcatKernel
<
paddle
::
platform
::
CUDADeviceContext
,
uint8_t
>
);
REGISTER_OP_CUDA_KERNEL
(
concat_grad
,
ops
::
ConcatGradKernel
<
paddle
::
platform
::
CUDADeviceContext
,
double
>
,
...
...
@@ -31,4 +32,5 @@ REGISTER_OP_CUDA_KERNEL(
ops
::
ConcatGradKernel
<
paddle
::
platform
::
CUDADeviceContext
,
bool
>
,
ops
::
ConcatGradKernel
<
paddle
::
platform
::
CUDADeviceContext
,
plat
::
float16
>
,
ops
::
ConcatGradKernel
<
paddle
::
platform
::
CUDADeviceContext
,
int64_t
>
,
ops
::
ConcatGradKernel
<
paddle
::
platform
::
CUDADeviceContext
,
int
>
);
ops
::
ConcatGradKernel
<
paddle
::
platform
::
CUDADeviceContext
,
int
>
,
ops
::
ConcatKernel
<
paddle
::
platform
::
CUDADeviceContext
,
uint8_t
>
);
paddle/fluid/operators/reduce_ops/reduce_mean_op.cc
浏览文件 @
9567cbd7
...
...
@@ -100,6 +100,8 @@ REGISTER_OPERATOR(reduce_mean_grad, ops::ReduceGradOp,
ops
::
ReduceMeanDoubleGradOpBaseMaker
,
ops
::
ReduceMeanGradNoNeedBufferVarInferer
);
REGISTER_OP_CPU_KERNEL
(
reduce_mean
,
ops
::
ReduceKernel
<
paddle
::
platform
::
CPUDeviceContext
,
bool
,
ops
::
MeanFunctor
>
,
ops
::
ReduceKernel
<
paddle
::
platform
::
CPUDeviceContext
,
float
,
ops
::
MeanFunctor
>
,
ops
::
ReduceKernel
<
paddle
::
platform
::
CPUDeviceContext
,
...
...
@@ -110,5 +112,6 @@ using CPUReduceMeanGradKernel =
ops
::
ReduceGradKernel
<
paddle
::
platform
::
CPUDeviceContext
,
T
,
ops
::
MeanGradFunctor
,
true
>
;
REGISTER_OP_CPU_KERNEL
(
reduce_mean_grad
,
CPUReduceMeanGradKernel
<
float
>
,
REGISTER_OP_CPU_KERNEL
(
reduce_mean_grad
,
CPUReduceMeanGradKernel
<
bool
>
,
CPUReduceMeanGradKernel
<
float
>
,
CPUReduceMeanGradKernel
<
double
>
);
paddle/fluid/operators/reduce_ops/reduce_mean_op.cu
浏览文件 @
9567cbd7
...
...
@@ -65,5 +65,6 @@ class ReduceMeanKernel : public framework::OpKernel<T> {
}
// namespace operators
}
// namespace paddle
REGISTER_OP_CUDA_KERNEL
(
reduce_mean
,
ops
::
ReduceMeanKernel
<
float
>
,
REGISTER_OP_CUDA_KERNEL
(
reduce_mean
,
ops
::
ReduceMeanKernel
<
bool
>
,
ops
::
ReduceMeanKernel
<
float
>
,
ops
::
ReduceMeanKernel
<
double
>
);
paddle/fluid/operators/reduce_ops/reduce_mean_op.part.cu
浏览文件 @
9567cbd7
...
...
@@ -20,5 +20,6 @@ using CUDAReduceMeanGradKernel =
ops
::
ReduceGradKernel
<
paddle
::
platform
::
CUDADeviceContext
,
T
,
ops
::
MeanGradFunctor
,
true
>
;
REGISTER_OP_CUDA_KERNEL
(
reduce_mean_grad
,
CUDAReduceMeanGradKernel
<
float
>
,
REGISTER_OP_CUDA_KERNEL
(
reduce_mean_grad
,
CUDAReduceMeanGradKernel
<
bool
>
,
CUDAReduceMeanGradKernel
<
float
>
,
CUDAReduceMeanGradKernel
<
double
>
);
paddle/fluid/operators/reduce_ops/reduce_sum_op.cc
浏览文件 @
9567cbd7
...
...
@@ -109,8 +109,10 @@ REGISTER_OPERATOR(reduce_sum_grad, ops::ReduceGradOp,
ops
::
ReduceSumGradNoNeedBufferVarInferer
);
REGISTER_OP_CPU_KERNEL
(
reduce_sum
,
ops
::
ReduceKernel
<
paddle
::
platform
::
CPUDeviceContext
,
float
,
reduce_sum
,
ops
::
ReduceKernel
<
paddle
::
platform
::
CPUDeviceContext
,
bool
,
ops
::
SumFunctor
>
,
ops
::
ReduceKernel
<
paddle
::
platform
::
CPUDeviceContext
,
float
,
ops
::
SumFunctor
>
,
ops
::
ReduceKernel
<
paddle
::
platform
::
CPUDeviceContext
,
double
,
ops
::
SumFunctor
>
,
ops
::
ReduceKernel
<
paddle
::
platform
::
CPUDeviceContext
,
int
,
ops
::
SumFunctor
>
,
...
...
@@ -128,7 +130,8 @@ using CPUReduceSumGradKernel =
ops
::
ReduceSumGradKernel
<
paddle
::
platform
::
CPUDeviceContext
,
T
,
ops
::
SumGradFunctor
,
true
>
;
REGISTER_OP_CPU_KERNEL
(
reduce_sum_grad
,
CPUReduceSumGradKernel
<
float
>
,
REGISTER_OP_CPU_KERNEL
(
reduce_sum_grad
,
CPUReduceSumGradKernel
<
bool
>
,
CPUReduceSumGradKernel
<
float
>
,
CPUReduceSumGradKernel
<
double
>
,
CPUReduceSumGradKernel
<
int
>
,
CPUReduceSumGradKernel
<
int64_t
>
,
...
...
paddle/fluid/operators/reduce_ops/reduce_sum_op.cu
浏览文件 @
9567cbd7
...
...
@@ -70,7 +70,8 @@ class ReduceSumKernel : public framework::OpKernel<T> {
}
// namespace operators
}
// namespace paddle
REGISTER_OP_CUDA_KERNEL
(
reduce_sum
,
ops
::
ReduceSumKernel
<
float
>
,
REGISTER_OP_CUDA_KERNEL
(
reduce_sum
,
ops
::
ReduceSumKernel
<
bool
>
,
ops
::
ReduceSumKernel
<
float
>
,
ops
::
ReduceSumKernel
<
double
>
,
ops
::
ReduceSumKernel
<
int
>
,
ops
::
ReduceSumKernel
<
int64_t
>
,
ops
::
ReduceSumKernel
<
paddle
::
platform
::
complex64
>
,
...
...
paddle/fluid/operators/reduce_ops/reduce_sum_op.part.cu
浏览文件 @
9567cbd7
...
...
@@ -20,7 +20,8 @@ using CUDAReduceSumGradKernel =
ops
::
ReduceGradKernel
<
paddle
::
platform
::
CUDADeviceContext
,
T
,
ops
::
SumGradFunctor
,
true
>
;
REGISTER_OP_CUDA_KERNEL
(
reduce_sum_grad
,
CUDAReduceSumGradKernel
<
float
>
,
REGISTER_OP_CUDA_KERNEL
(
reduce_sum_grad
,
CUDAReduceSumGradKernel
<
bool
>
,
CUDAReduceSumGradKernel
<
float
>
,
CUDAReduceSumGradKernel
<
double
>
,
CUDAReduceSumGradKernel
<
int
>
,
CUDAReduceSumGradKernel
<
int64_t
>
,
...
...
paddle/fluid/operators/tril_triu_op.cc
浏览文件 @
9567cbd7
...
...
@@ -105,13 +105,15 @@ REGISTER_OPERATOR(tril_triu, ops::TrilTriuOp, ops::TrilTriuOpMaker,
ops
::
TrilTriuGradOpMaker
<
paddle
::
imperative
::
OpBase
>
);
REGISTER_OPERATOR
(
tril_triu_grad
,
ops
::
TrilTriuGradOp
);
REGISTER_OP_CPU_KERNEL
(
tril_triu
,
ops
::
TrilTriuOpKernel
<
paddle
::
platform
::
CPUDeviceContext
,
float
>
,
tril_triu
,
ops
::
TrilTriuOpKernel
<
paddle
::
platform
::
CPUDeviceContext
,
bool
>
,
ops
::
TrilTriuOpKernel
<
paddle
::
platform
::
CPUDeviceContext
,
float
>
,
ops
::
TrilTriuOpKernel
<
paddle
::
platform
::
CPUDeviceContext
,
double
>
,
ops
::
TrilTriuOpKernel
<
paddle
::
platform
::
CPUDeviceContext
,
int
>
,
ops
::
TrilTriuOpKernel
<
paddle
::
platform
::
CPUDeviceContext
,
int64_t
>
,
ops
::
TrilTriuOpKernel
<
paddle
::
platform
::
CPUDeviceContext
,
plat
::
float16
>
);
REGISTER_OP_CPU_KERNEL
(
tril_triu_grad
,
ops
::
TrilTriuGradOpKernel
<
paddle
::
platform
::
CPUDeviceContext
,
bool
>
,
ops
::
TrilTriuGradOpKernel
<
paddle
::
platform
::
CPUDeviceContext
,
float
>
,
ops
::
TrilTriuGradOpKernel
<
paddle
::
platform
::
CPUDeviceContext
,
double
>
,
ops
::
TrilTriuGradOpKernel
<
paddle
::
platform
::
CPUDeviceContext
,
int
>
,
...
...
paddle/fluid/operators/tril_triu_op.cu
浏览文件 @
9567cbd7
...
...
@@ -18,7 +18,7 @@ namespace ops = paddle::operators;
namespace
plat
=
paddle
::
platform
;
REGISTER_OP_CUDA_KERNEL
(
tril_triu
,
tril_triu
,
ops
::
TrilTriuOpKernel
<
paddle
::
platform
::
CUDADeviceContext
,
bool
>
,
ops
::
TrilTriuOpKernel
<
paddle
::
platform
::
CUDADeviceContext
,
float
>
,
ops
::
TrilTriuOpKernel
<
paddle
::
platform
::
CUDADeviceContext
,
double
>
,
ops
::
TrilTriuOpKernel
<
paddle
::
platform
::
CUDADeviceContext
,
int
>
,
...
...
@@ -26,6 +26,7 @@ REGISTER_OP_CUDA_KERNEL(
ops
::
TrilTriuOpKernel
<
paddle
::
platform
::
CUDADeviceContext
,
plat
::
float16
>
);
REGISTER_OP_CUDA_KERNEL
(
tril_triu_grad
,
ops
::
TrilTriuGradOpKernel
<
paddle
::
platform
::
CUDADeviceContext
,
bool
>
,
ops
::
TrilTriuGradOpKernel
<
paddle
::
platform
::
CUDADeviceContext
,
float
>
,
ops
::
TrilTriuGradOpKernel
<
paddle
::
platform
::
CUDADeviceContext
,
double
>
,
ops
::
TrilTriuGradOpKernel
<
paddle
::
platform
::
CUDADeviceContext
,
int
>
,
...
...
python/paddle/tensor/creation.py
浏览文件 @
9567cbd7
...
...
@@ -576,7 +576,7 @@ def tril(x, diagonal=0, name=None):
Args:
x (Tensor): The input x which is a Tensor.
Support data types: ``float64``, ``float32``, ``int32``, ``int64``.
Support data types: ``
bool``, ``
float64``, ``float32``, ``int32``, ``int64``.
diagonal (int, optional): The diagonal to consider, default value is 0.
If :attr:`diagonal` = 0, all elements on and below the main diagonal are
retained. A positive value includes just as many diagonals above the main
...
...
python/paddle/tensor/manipulation.py
浏览文件 @
9567cbd7
...
...
@@ -80,7 +80,7 @@ def concat(x, axis=0, name=None):
Args:
x(list|tuple): ``x`` is a Tensor list or Tensor tuple which is with data type bool, float16,
float32, float64, int32, int64. All the Tensors in ``x`` must have same data type.
float32, float64, int32, int64
, uint8
. All the Tensors in ``x`` must have same data type.
axis(int|Tensor, optional): Specify the axis to operate on the input Tensors.
It's a scalar with data type int or a Tensor with shape [1] and data type int32
or int64. The effective range is [-R, R), where R is Rank(x). When ``axis < 0``,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录