Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
1e1c7275
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
1e1c7275
编写于
10月 19, 2022
作者:
W
will-jl944
提交者:
GitHub
10月 19, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
slice op supports uint8_t (#47067)
上级
be3908a3
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
11 addition
and
0 deletion
+11
-0
paddle/fluid/operators/slice_op.cc
paddle/fluid/operators/slice_op.cc
+4
-0
paddle/phi/kernels/cpu/slice_grad_kernel.cc
paddle/phi/kernels/cpu/slice_grad_kernel.cc
+1
-0
paddle/phi/kernels/cpu/slice_kernel.cc
paddle/phi/kernels/cpu/slice_kernel.cc
+1
-0
paddle/phi/kernels/funcs/eigen/pad.cc
paddle/phi/kernels/funcs/eigen/pad.cc
+1
-0
paddle/phi/kernels/funcs/eigen/pad.cu
paddle/phi/kernels/funcs/eigen/pad.cu
+1
-0
paddle/phi/kernels/funcs/eigen/slice.cu
paddle/phi/kernels/funcs/eigen/slice.cu
+1
-0
paddle/phi/kernels/gpu/slice_grad_kernel.cu.cc
paddle/phi/kernels/gpu/slice_grad_kernel.cu.cc
+1
-0
paddle/phi/kernels/gpu/slice_kernel.cu.cc
paddle/phi/kernels/gpu/slice_kernel.cu.cc
+1
-0
未找到文件。
paddle/fluid/operators/slice_op.cc
100755 → 100644
浏览文件 @
1e1c7275
...
@@ -460,6 +460,7 @@ REGISTER_OPERATOR(slice_grad,
...
@@ -460,6 +460,7 @@ REGISTER_OPERATOR(slice_grad,
REGISTER_OP_CPU_KERNEL
(
REGISTER_OP_CPU_KERNEL
(
slice
,
slice
,
ops
::
SliceKernel
<
phi
::
CPUContext
,
bool
>
,
ops
::
SliceKernel
<
phi
::
CPUContext
,
bool
>
,
ops
::
SliceKernel
<
phi
::
CPUContext
,
uint8_t
>
,
ops
::
SliceKernel
<
phi
::
CPUContext
,
int
>
,
ops
::
SliceKernel
<
phi
::
CPUContext
,
int
>
,
ops
::
SliceKernel
<
phi
::
CPUContext
,
int64_t
>
,
ops
::
SliceKernel
<
phi
::
CPUContext
,
int64_t
>
,
ops
::
SliceKernel
<
phi
::
CPUContext
,
float
>
,
ops
::
SliceKernel
<
phi
::
CPUContext
,
float
>
,
...
@@ -471,6 +472,7 @@ REGISTER_OP_CPU_KERNEL(
...
@@ -471,6 +472,7 @@ REGISTER_OP_CPU_KERNEL(
REGISTER_OP_CPU_KERNEL
(
REGISTER_OP_CPU_KERNEL
(
slice_grad
,
slice_grad
,
ops
::
SliceGradKernel
<
phi
::
CPUContext
,
bool
>
,
ops
::
SliceGradKernel
<
phi
::
CPUContext
,
bool
>
,
ops
::
SliceGradKernel
<
phi
::
CPUContext
,
uint8_t
>
,
ops
::
SliceGradKernel
<
phi
::
CPUContext
,
int
>
,
ops
::
SliceGradKernel
<
phi
::
CPUContext
,
int
>
,
ops
::
SliceGradKernel
<
phi
::
CPUContext
,
int64_t
>
,
ops
::
SliceGradKernel
<
phi
::
CPUContext
,
int64_t
>
,
ops
::
SliceGradKernel
<
phi
::
CPUContext
,
float
>
,
ops
::
SliceGradKernel
<
phi
::
CPUContext
,
float
>
,
...
@@ -482,6 +484,7 @@ REGISTER_OP_CPU_KERNEL(
...
@@ -482,6 +484,7 @@ REGISTER_OP_CPU_KERNEL(
REGISTER_OP_CUDA_KERNEL
(
REGISTER_OP_CUDA_KERNEL
(
slice
,
slice
,
ops
::
SliceKernel
<
phi
::
GPUContext
,
bool
>
,
ops
::
SliceKernel
<
phi
::
GPUContext
,
bool
>
,
ops
::
SliceKernel
<
phi
::
GPUContext
,
uint8_t
>
,
ops
::
SliceKernel
<
phi
::
GPUContext
,
float
>
,
ops
::
SliceKernel
<
phi
::
GPUContext
,
float
>
,
ops
::
SliceKernel
<
phi
::
GPUContext
,
double
>
,
ops
::
SliceKernel
<
phi
::
GPUContext
,
double
>
,
ops
::
SliceKernel
<
phi
::
GPUContext
,
int
>
,
ops
::
SliceKernel
<
phi
::
GPUContext
,
int
>
,
...
@@ -494,6 +497,7 @@ REGISTER_OP_CUDA_KERNEL(
...
@@ -494,6 +497,7 @@ REGISTER_OP_CUDA_KERNEL(
REGISTER_OP_CUDA_KERNEL
(
REGISTER_OP_CUDA_KERNEL
(
slice_grad
,
slice_grad
,
ops
::
SliceGradKernel
<
phi
::
GPUContext
,
bool
>
,
ops
::
SliceGradKernel
<
phi
::
GPUContext
,
bool
>
,
ops
::
SliceGradKernel
<
phi
::
GPUContext
,
uint8_t
>
,
ops
::
SliceGradKernel
<
phi
::
GPUContext
,
float
>
,
ops
::
SliceGradKernel
<
phi
::
GPUContext
,
float
>
,
ops
::
SliceGradKernel
<
phi
::
GPUContext
,
double
>
,
ops
::
SliceGradKernel
<
phi
::
GPUContext
,
double
>
,
ops
::
SliceGradKernel
<
phi
::
GPUContext
,
int
>
,
ops
::
SliceGradKernel
<
phi
::
GPUContext
,
int
>
,
...
...
paddle/phi/kernels/cpu/slice_grad_kernel.cc
浏览文件 @
1e1c7275
...
@@ -23,6 +23,7 @@ PD_REGISTER_KERNEL(slice_grad,
...
@@ -23,6 +23,7 @@ PD_REGISTER_KERNEL(slice_grad,
ALL_LAYOUT
,
ALL_LAYOUT
,
phi
::
SliceGradRawKernel
,
phi
::
SliceGradRawKernel
,
bool
,
bool
,
uint8_t
,
int
,
int
,
int64_t
,
int64_t
,
float
,
float
,
...
...
paddle/phi/kernels/cpu/slice_kernel.cc
浏览文件 @
1e1c7275
...
@@ -23,6 +23,7 @@ PD_REGISTER_KERNEL(slice,
...
@@ -23,6 +23,7 @@ PD_REGISTER_KERNEL(slice,
ALL_LAYOUT
,
ALL_LAYOUT
,
phi
::
SliceRawKernel
,
phi
::
SliceRawKernel
,
bool
,
bool
,
uint8_t
,
int
,
int
,
int64_t
,
int64_t
,
float
,
float
,
...
...
paddle/phi/kernels/funcs/eigen/pad.cc
浏览文件 @
1e1c7275
...
@@ -59,6 +59,7 @@ struct EigenPad<Eigen::DefaultDevice, T, Rank> {
...
@@ -59,6 +59,7 @@ struct EigenPad<Eigen::DefaultDevice, T, Rank> {
template struct FUNCTOR<Eigen::DefaultDevice, TYPE, 6>;
template struct FUNCTOR<Eigen::DefaultDevice, TYPE, 6>;
INSTANTIATION
(
EigenPad
,
bool
);
INSTANTIATION
(
EigenPad
,
bool
);
INSTANTIATION
(
EigenPad
,
uint8_t
);
INSTANTIATION
(
EigenPad
,
int
);
INSTANTIATION
(
EigenPad
,
int
);
INSTANTIATION
(
EigenPad
,
int64_t
);
INSTANTIATION
(
EigenPad
,
int64_t
);
INSTANTIATION
(
EigenPad
,
float
);
INSTANTIATION
(
EigenPad
,
float
);
...
...
paddle/phi/kernels/funcs/eigen/pad.cu
浏览文件 @
1e1c7275
...
@@ -59,6 +59,7 @@ struct EigenPad<Eigen::GpuDevice, T, Rank> {
...
@@ -59,6 +59,7 @@ struct EigenPad<Eigen::GpuDevice, T, Rank> {
template struct FUNCTOR<Eigen::GpuDevice, TYPE, 5>; \
template struct FUNCTOR<Eigen::GpuDevice, TYPE, 5>; \
template struct FUNCTOR<Eigen::GpuDevice, TYPE, 6>
template struct FUNCTOR<Eigen::GpuDevice, TYPE, 6>
INSTANTIATION
(
EigenPad
,
bool
);
INSTANTIATION
(
EigenPad
,
bool
);
INSTANTIATION
(
EigenPad
,
uint8_t
);
INSTANTIATION
(
EigenPad
,
int
);
INSTANTIATION
(
EigenPad
,
int
);
INSTANTIATION
(
EigenPad
,
int64_t
);
INSTANTIATION
(
EigenPad
,
int64_t
);
INSTANTIATION
(
EigenPad
,
float
);
INSTANTIATION
(
EigenPad
,
float
);
...
...
paddle/phi/kernels/funcs/eigen/slice.cu
浏览文件 @
1e1c7275
...
@@ -59,6 +59,7 @@ struct EigenSlice<Eigen::GpuDevice, T, Rank> {
...
@@ -59,6 +59,7 @@ struct EigenSlice<Eigen::GpuDevice, T, Rank> {
template struct FUNCTOR<Eigen::GpuDevice, TYPE, 5>; \
template struct FUNCTOR<Eigen::GpuDevice, TYPE, 5>; \
template struct FUNCTOR<Eigen::GpuDevice, TYPE, 6>
template struct FUNCTOR<Eigen::GpuDevice, TYPE, 6>
INSTANTIATION
(
EigenSlice
,
bool
);
INSTANTIATION
(
EigenSlice
,
bool
);
INSTANTIATION
(
EigenSlice
,
uint8_t
);
INSTANTIATION
(
EigenSlice
,
int
);
INSTANTIATION
(
EigenSlice
,
int
);
INSTANTIATION
(
EigenSlice
,
int64_t
);
INSTANTIATION
(
EigenSlice
,
int64_t
);
INSTANTIATION
(
EigenSlice
,
float
);
INSTANTIATION
(
EigenSlice
,
float
);
...
...
paddle/phi/kernels/gpu/slice_grad_kernel.cu.cc
浏览文件 @
1e1c7275
...
@@ -23,6 +23,7 @@ PD_REGISTER_KERNEL(slice_grad,
...
@@ -23,6 +23,7 @@ PD_REGISTER_KERNEL(slice_grad,
ALL_LAYOUT
,
ALL_LAYOUT
,
phi
::
SliceGradRawKernel
,
phi
::
SliceGradRawKernel
,
bool
,
bool
,
uint8_t
,
int
,
int
,
int64_t
,
int64_t
,
float
,
float
,
...
...
paddle/phi/kernels/gpu/slice_kernel.cu.cc
浏览文件 @
1e1c7275
...
@@ -23,6 +23,7 @@ PD_REGISTER_KERNEL(slice,
...
@@ -23,6 +23,7 @@ PD_REGISTER_KERNEL(slice,
ALL_LAYOUT
,
ALL_LAYOUT
,
phi
::
SliceRawKernel
,
phi
::
SliceRawKernel
,
bool
,
bool
,
uint8_t
,
int
,
int
,
int64_t
,
int64_t
,
float
,
float
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录