Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
3951c40d
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看板
未验证
提交
3951c40d
编写于
4月 11, 2023
作者:
Z
zhangyuqin1998
提交者:
GitHub
4月 11, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
delete remote_prefetch (#52748)
上级
f03dcff7
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
6 addition
and
20 deletion
+6
-20
paddle/fluid/operators/hierarchical_sigmoid_op.cc
paddle/fluid/operators/hierarchical_sigmoid_op.cc
+0
-1
paddle/phi/api/yaml/legacy_backward.yaml
paddle/phi/api/yaml/legacy_backward.yaml
+2
-2
paddle/phi/api/yaml/legacy_ops.yaml
paddle/phi/api/yaml/legacy_ops.yaml
+1
-1
paddle/phi/infermeta/multiary.cc
paddle/phi/infermeta/multiary.cc
+0
-1
paddle/phi/infermeta/multiary.h
paddle/phi/infermeta/multiary.h
+0
-1
paddle/phi/kernels/cpu/hsigmoid_loss_grad.h
paddle/phi/kernels/cpu/hsigmoid_loss_grad.h
+0
-1
paddle/phi/kernels/cpu/hsigmoid_loss_grad_kernel.cc
paddle/phi/kernels/cpu/hsigmoid_loss_grad_kernel.cc
+0
-2
paddle/phi/kernels/cpu/hsigmoid_loss_kernel.cc
paddle/phi/kernels/cpu/hsigmoid_loss_kernel.cc
+0
-1
paddle/phi/kernels/hsigmoid_loss_grad_kernel.h
paddle/phi/kernels/hsigmoid_loss_grad_kernel.h
+0
-1
paddle/phi/kernels/hsigmoid_loss_kernel.h
paddle/phi/kernels/hsigmoid_loss_kernel.h
+0
-1
paddle/phi/kernels/selected_rows/hsigmoid_loss_grad_kernel.cc
...le/phi/kernels/selected_rows/hsigmoid_loss_grad_kernel.cc
+0
-2
paddle/phi/kernels/selected_rows/hsigmoid_loss_grad_kernel.h
paddle/phi/kernels/selected_rows/hsigmoid_loss_grad_kernel.h
+0
-1
paddle/phi/ops/compat/hierarchical_sigmoid_sig.cc
paddle/phi/ops/compat/hierarchical_sigmoid_sig.cc
+3
-3
python/paddle/fluid/tests/unittests/test_hsigmoid_op.py
python/paddle/fluid/tests/unittests/test_hsigmoid_op.py
+0
-1
python/paddle/nn/functional/loss.py
python/paddle/nn/functional/loss.py
+0
-1
未找到文件。
paddle/fluid/operators/hierarchical_sigmoid_op.cc
浏览文件 @
3951c40d
...
@@ -124,7 +124,6 @@ class HierarchicalSigmoidOpMaker : public framework::OpProtoAndCheckerMaker {
...
@@ -124,7 +124,6 @@ class HierarchicalSigmoidOpMaker : public framework::OpProtoAndCheckerMaker {
AddAttr
<
AttrType
>
(
"num_classes"
,
"(int, optional), The number of classes"
)
AddAttr
<
AttrType
>
(
"num_classes"
,
"(int, optional), The number of classes"
)
.
SetDefault
(
2
);
.
SetDefault
(
2
);
// for parameter prefetch
// for parameter prefetch
AddAttr
<
bool
>
(
"remote_prefetch"
,
""
).
SetDefault
(
false
);
AddAttr
<
int
>
(
"trainer_id"
,
"trainer id from 0 ~ worker_num."
).
SetDefault
(
0
);
AddAttr
<
int
>
(
"trainer_id"
,
"trainer id from 0 ~ worker_num."
).
SetDefault
(
0
);
AddAttr
<
std
::
vector
<
int64_t
>>
(
"height_sections"
,
AddAttr
<
std
::
vector
<
int64_t
>>
(
"height_sections"
,
"Height for each output SelectedRows."
)
"Height for each output SelectedRows."
)
...
...
paddle/phi/api/yaml/legacy_backward.yaml
浏览文件 @
3951c40d
...
@@ -475,8 +475,8 @@
...
@@ -475,8 +475,8 @@
func
:
heaviside_grad
func
:
heaviside_grad
-
backward_op
:
hsigmoid_loss_grad
-
backward_op
:
hsigmoid_loss_grad
forward
:
hsigmoid_loss (Tensor x, Tensor label, Tensor w, Tensor bias, Tensor path, Tensor code, int num_classes, bool
remote_prefetch, bool
is_sparse) -> Tensor(out), Tensor(pre_out), Tensor(w_out)
forward
:
hsigmoid_loss (Tensor x, Tensor label, Tensor w, Tensor bias, Tensor path, Tensor code, int num_classes, bool is_sparse) -> Tensor(out), Tensor(pre_out), Tensor(w_out)
args
:
(Tensor x, Tensor w, Tensor label, Tensor path, Tensor code, Tensor bias, Tensor pre_out, Tensor out_grad, int num_classes, bool
remote_prefetch, bool
is_sparse)
args
:
(Tensor x, Tensor w, Tensor label, Tensor path, Tensor code, Tensor bias, Tensor pre_out, Tensor out_grad, int num_classes, bool is_sparse)
output
:
Tensor(x_grad), Tensor(w_grad), Tensor(bias_grad)
output
:
Tensor(x_grad), Tensor(w_grad), Tensor(bias_grad)
infer_meta
:
infer_meta
:
func
:
GeneralTernaryGradInferMeta
func
:
GeneralTernaryGradInferMeta
...
...
paddle/phi/api/yaml/legacy_ops.yaml
浏览文件 @
3951c40d
...
@@ -684,7 +684,7 @@
...
@@ -684,7 +684,7 @@
backward
:
heaviside_grad
backward
:
heaviside_grad
-
op
:
hsigmoid_loss
-
op
:
hsigmoid_loss
args
:
(Tensor x, Tensor label, Tensor w, Tensor bias, Tensor path, Tensor code, int num_classes, bool
remote_prefetch, bool
is_sparse)
args
:
(Tensor x, Tensor label, Tensor w, Tensor bias, Tensor path, Tensor code, int num_classes, bool is_sparse)
output
:
Tensor(out), Tensor(pre_out), Tensor(w_out)
output
:
Tensor(out), Tensor(pre_out), Tensor(w_out)
infer_meta
:
infer_meta
:
func
:
HSigmoidLossInferMeta
func
:
HSigmoidLossInferMeta
...
...
paddle/phi/infermeta/multiary.cc
浏览文件 @
3951c40d
...
@@ -1432,7 +1432,6 @@ void HSigmoidLossInferMeta(const MetaTensor& x,
...
@@ -1432,7 +1432,6 @@ void HSigmoidLossInferMeta(const MetaTensor& x,
const
MetaTensor
&
path
,
const
MetaTensor
&
path
,
const
MetaTensor
&
code
,
const
MetaTensor
&
code
,
int
num_classes
,
int
num_classes
,
bool
remote_prefetch
,
bool
is_sparse
,
bool
is_sparse
,
MetaTensor
*
out
,
MetaTensor
*
out
,
MetaTensor
*
pre_out
,
MetaTensor
*
pre_out
,
...
...
paddle/phi/infermeta/multiary.h
浏览文件 @
3951c40d
...
@@ -312,7 +312,6 @@ void HSigmoidLossInferMeta(const MetaTensor& x,
...
@@ -312,7 +312,6 @@ void HSigmoidLossInferMeta(const MetaTensor& x,
const
MetaTensor
&
path
,
const
MetaTensor
&
path
,
const
MetaTensor
&
code
,
const
MetaTensor
&
code
,
int
num_classes
,
int
num_classes
,
bool
remote_prefetch
,
bool
is_sparse
,
bool
is_sparse
,
MetaTensor
*
out
,
MetaTensor
*
out
,
MetaTensor
*
pre_out
,
MetaTensor
*
pre_out
,
...
...
paddle/phi/kernels/cpu/hsigmoid_loss_grad.h
浏览文件 @
3951c40d
...
@@ -35,7 +35,6 @@ void HSigmoidLossGradKernelImpl(const Context& ctx,
...
@@ -35,7 +35,6 @@ void HSigmoidLossGradKernelImpl(const Context& ctx,
const
DenseTensor
&
pre_out
,
const
DenseTensor
&
pre_out
,
const
DenseTensor
&
out_grad
,
const
DenseTensor
&
out_grad
,
int
num_classes
,
int
num_classes
,
bool
remote_prefetch
,
bool
is_sparse
,
bool
is_sparse
,
DenseTensor
*
x_grad
,
DenseTensor
*
x_grad
,
DenseTensor
*
w_grad
,
DenseTensor
*
w_grad
,
...
...
paddle/phi/kernels/cpu/hsigmoid_loss_grad_kernel.cc
浏览文件 @
3951c40d
...
@@ -31,7 +31,6 @@ void HSigmoidLossGradKernel(const Context& ctx,
...
@@ -31,7 +31,6 @@ void HSigmoidLossGradKernel(const Context& ctx,
const
DenseTensor
&
pre_out
,
const
DenseTensor
&
pre_out
,
const
DenseTensor
&
out_grad
,
const
DenseTensor
&
out_grad
,
int
num_classes
,
int
num_classes
,
bool
remote_prefetch
,
bool
is_sparse
,
bool
is_sparse
,
DenseTensor
*
x_grad
,
DenseTensor
*
x_grad
,
DenseTensor
*
w_grad
,
DenseTensor
*
w_grad
,
...
@@ -46,7 +45,6 @@ void HSigmoidLossGradKernel(const Context& ctx,
...
@@ -46,7 +45,6 @@ void HSigmoidLossGradKernel(const Context& ctx,
pre_out
,
pre_out
,
out_grad
,
out_grad
,
num_classes
,
num_classes
,
remote_prefetch
,
is_sparse
,
is_sparse
,
x_grad
,
x_grad
,
w_grad
,
w_grad
,
...
...
paddle/phi/kernels/cpu/hsigmoid_loss_kernel.cc
浏览文件 @
3951c40d
...
@@ -34,7 +34,6 @@ void HSigmoidLossKernel(const Context& ctx,
...
@@ -34,7 +34,6 @@ void HSigmoidLossKernel(const Context& ctx,
const
paddle
::
optional
<
DenseTensor
>&
path
,
const
paddle
::
optional
<
DenseTensor
>&
path
,
const
paddle
::
optional
<
DenseTensor
>&
code
,
const
paddle
::
optional
<
DenseTensor
>&
code
,
int
num_classes
,
int
num_classes
,
bool
remote_prefetch
,
bool
is_sparse
,
bool
is_sparse
,
DenseTensor
*
out
,
DenseTensor
*
out
,
DenseTensor
*
pre_out
,
DenseTensor
*
pre_out
,
...
...
paddle/phi/kernels/hsigmoid_loss_grad_kernel.h
浏览文件 @
3951c40d
...
@@ -29,7 +29,6 @@ void HSigmoidLossGradKernel(const Context& ctx,
...
@@ -29,7 +29,6 @@ void HSigmoidLossGradKernel(const Context& ctx,
const
DenseTensor
&
pre_out
,
const
DenseTensor
&
pre_out
,
const
DenseTensor
&
out_grad
,
const
DenseTensor
&
out_grad
,
int
num_classes
,
int
num_classes
,
bool
remote_prefetch
,
bool
is_sparse
,
bool
is_sparse
,
DenseTensor
*
x_grad
,
DenseTensor
*
x_grad
,
DenseTensor
*
w_grad
,
DenseTensor
*
w_grad
,
...
...
paddle/phi/kernels/hsigmoid_loss_kernel.h
浏览文件 @
3951c40d
...
@@ -27,7 +27,6 @@ void HSigmoidLossKernel(const Context& ctx,
...
@@ -27,7 +27,6 @@ void HSigmoidLossKernel(const Context& ctx,
const
paddle
::
optional
<
DenseTensor
>&
path
,
const
paddle
::
optional
<
DenseTensor
>&
path
,
const
paddle
::
optional
<
DenseTensor
>&
code
,
const
paddle
::
optional
<
DenseTensor
>&
code
,
int
num_classes
,
int
num_classes
,
bool
remote_prefetch
,
bool
is_sparse
,
bool
is_sparse
,
DenseTensor
*
out
,
DenseTensor
*
out
,
DenseTensor
*
pre_out
,
DenseTensor
*
pre_out
,
...
...
paddle/phi/kernels/selected_rows/hsigmoid_loss_grad_kernel.cc
浏览文件 @
3951c40d
...
@@ -48,7 +48,6 @@ void HSigmoidLossGradKernel(const Context& ctx,
...
@@ -48,7 +48,6 @@ void HSigmoidLossGradKernel(const Context& ctx,
const
DenseTensor
&
pre_out
,
const
DenseTensor
&
pre_out
,
const
DenseTensor
&
out_grad
,
const
DenseTensor
&
out_grad
,
int
num_classes
,
int
num_classes
,
bool
remote_prefetch
,
bool
is_sparse
,
bool
is_sparse
,
DenseTensor
*
x_grad
,
DenseTensor
*
x_grad
,
SelectedRows
*
w_grad
,
SelectedRows
*
w_grad
,
...
@@ -74,7 +73,6 @@ void HSigmoidLossGradKernel(const Context& ctx,
...
@@ -74,7 +73,6 @@ void HSigmoidLossGradKernel(const Context& ctx,
pre_out
,
pre_out
,
out_grad
,
out_grad
,
num_classes
,
num_classes
,
remote_prefetch
,
is_sparse
,
is_sparse
,
x_grad
,
x_grad
,
w_grad_value
,
w_grad_value
,
...
...
paddle/phi/kernels/selected_rows/hsigmoid_loss_grad_kernel.h
浏览文件 @
3951c40d
...
@@ -31,7 +31,6 @@ void HSigmoidLossGradKernel(const Context& ctx,
...
@@ -31,7 +31,6 @@ void HSigmoidLossGradKernel(const Context& ctx,
const
DenseTensor
&
pre_out
,
const
DenseTensor
&
pre_out
,
const
DenseTensor
&
out_grad
,
const
DenseTensor
&
out_grad
,
int
num_classes
,
int
num_classes
,
bool
remote_prefetch
,
bool
is_sparse
,
bool
is_sparse
,
DenseTensor
*
x_grad
,
DenseTensor
*
x_grad
,
SelectedRows
*
w_grad
,
SelectedRows
*
w_grad
,
...
...
paddle/phi/ops/compat/hierarchical_sigmoid_sig.cc
浏览文件 @
3951c40d
...
@@ -20,7 +20,7 @@ KernelSignature HierarchicalSigmoidOpArgumentMapping(
...
@@ -20,7 +20,7 @@ KernelSignature HierarchicalSigmoidOpArgumentMapping(
const
ArgumentMappingContext
&
ctx
)
{
const
ArgumentMappingContext
&
ctx
)
{
return
KernelSignature
(
"hsigmoid_loss"
,
return
KernelSignature
(
"hsigmoid_loss"
,
{
"X"
,
"Label"
,
"W"
,
"Bias"
,
"PathTable"
,
"PathCode"
},
{
"X"
,
"Label"
,
"W"
,
"Bias"
,
"PathTable"
,
"PathCode"
},
{
"num_classes"
,
"
remote_prefetch"
,
"
is_sparse"
},
{
"num_classes"
,
"is_sparse"
},
{
"Out"
,
"PreOut"
,
"W_Out"
});
{
"Out"
,
"PreOut"
,
"W_Out"
});
}
}
...
@@ -36,7 +36,7 @@ KernelSignature HierarchicalSigmoidGradOpArgumentMapping(
...
@@ -36,7 +36,7 @@ KernelSignature HierarchicalSigmoidGradOpArgumentMapping(
"Bias"
,
"Bias"
,
"PreOut"
,
"PreOut"
,
"Out@GRAD"
},
"Out@GRAD"
},
{
"num_classes"
,
"
remote_prefetch"
,
"
is_sparse"
},
{
"num_classes"
,
"is_sparse"
},
{
"X@GRAD"
,
"W@GRAD"
,
"Bias@GRAD"
});
{
"X@GRAD"
,
"W@GRAD"
,
"Bias@GRAD"
});
}
else
if
(
ctx
.
IsSelectedRowsOutput
(
"W@GRAD"
))
{
}
else
if
(
ctx
.
IsSelectedRowsOutput
(
"W@GRAD"
))
{
return
KernelSignature
(
"hsigmoid_loss_grad_sr"
,
return
KernelSignature
(
"hsigmoid_loss_grad_sr"
,
...
@@ -48,7 +48,7 @@ KernelSignature HierarchicalSigmoidGradOpArgumentMapping(
...
@@ -48,7 +48,7 @@ KernelSignature HierarchicalSigmoidGradOpArgumentMapping(
"Bias"
,
"Bias"
,
"PreOut"
,
"PreOut"
,
"Out@GRAD"
},
"Out@GRAD"
},
{
"num_classes"
,
"
remote_prefetch"
,
"
is_sparse"
},
{
"num_classes"
,
"is_sparse"
},
{
"X@GRAD"
,
"W@GRAD"
,
"Bias@GRAD"
});
{
"X@GRAD"
,
"W@GRAD"
,
"Bias@GRAD"
});
}
else
{
}
else
{
return
KernelSignature
(
"unregistered"
,
{},
{},
{});
return
KernelSignature
(
"unregistered"
,
{},
{},
{});
...
...
python/paddle/fluid/tests/unittests/test_hsigmoid_op.py
浏览文件 @
3951c40d
...
@@ -177,7 +177,6 @@ def python_api(
...
@@ -177,7 +177,6 @@ def python_api(
path_code
=
None
,
path_code
=
None
,
num_classes
=-
1
,
num_classes
=-
1
,
is_sparse
=
False
,
is_sparse
=
False
,
remote_prefetch
=
False
,
):
):
return
paddle
.
nn
.
functional
.
hsigmoid_loss
(
return
paddle
.
nn
.
functional
.
hsigmoid_loss
(
input
,
input
,
...
...
python/paddle/nn/functional/loss.py
浏览文件 @
3951c40d
...
@@ -1016,7 +1016,6 @@ def hsigmoid_loss(
...
@@ -1016,7 +1016,6 @@ def hsigmoid_loss(
attrs
=
{
attrs
=
{
"num_classes"
:
num_classes
,
"num_classes"
:
num_classes
,
"is_sparse"
:
is_sparse
,
"is_sparse"
:
is_sparse
,
"remote_prefetch"
:
is_sparse
,
}
}
inputs
=
{
inputs
=
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录