-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
【PIR Dist Op Reg No.22】 reg pull_sparse_v2 #63014
【PIR Dist Op Reg No.22】 reg pull_sparse_v2 #63014
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
❌ The PR is not created using PR's template. You can refer to this Demo. |
36c57b0
to
cc3882b
Compare
@xingmingyyj 这个算子看上去还有问题,我看这个算子好像跟其他不太一样,yaml仿照push_sparse_v2来注册的 |
哦哦,这个我也不清楚。麻烦研发老师看一下吧@kangguangli |
edea9e7
to
015a785
Compare
@kangguangli 麻烦辛苦再review一下,这里ci上报了第三方库相应的报错 |
paddle/phi/infermeta/binary.cc
Outdated
phi::errors::InvalidArgument( | ||
"Output(Out) of PullSparseV2Op can not be null")); | ||
|
||
auto hidden_size = embeddingdim; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
auto hidden_size = embeddingdim; | |
auto hidden_size = embedding_dim; |
这个PR的问题目前是出在这里。
paddle/phi/api/yaml/backward.yaml
Outdated
forward : pull_sparse_v2 (Tensor[] ids, Tensor[] w, int embeddingdim = 11, int tableid = 0, str accessorclass = "", str ctrlabelname = "", int paddingid = 0, bool scalesparsegrad = true, str[] inputnames = {}, bool is_distributed = true) -> Tensor[](out) | ||
args : (Tensor[] ids, Tensor[] w, Tensor[] out_grad, int embeddingdim, int tableid, str accessorclass, str ctrlabelname, int paddingid, bool scalesparsegrad, str[] inputnames, bool is_distributed) | ||
output : Tensor[](out_grad_out) | ||
invoke : push_sparse_v2(ids, w, out_grad, embeddingdim, tableid, accessorclass, ctrlabelname, paddingid, scalesparsegrad, inputnames, is_distributed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的命名也需要替换下。
Sorry to inform you that 759b953's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually. |
paddle/phi/api/yaml/op_compat.yaml
Outdated
@@ -2653,6 +2653,14 @@ | |||
outputs : | |||
out : Out | |||
|
|||
- op : pull_sparse_v2 | |||
inputs : | |||
{ ids : Ids, W : w} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ ids : Ids, W : w} | |
{ ids : Ids, w : W} |
push_sparse_v2也需要同步修改一下。
|
||
for (size_t i = 0; i < n_ids; ++i) { | ||
out[i]->set_dims(outs_dims[i]); | ||
out[i]->share_lod(*ids[i], i); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里需要设置一下dtype
from paddle.base.layer_helper import LayerHelper | ||
|
||
|
||
class TestPullGpupsSparseOpTranslator( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class TestPullGpupsSparseOpTranslator( | |
class TestPullSparseV2OpTranslator( |
inputs={"Ids": [ids], "W": [w]}, | ||
outputs={"Out": [out]}, | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return out |
这里也需要将out返回
paddle/phi/api/yaml/backward.yaml
Outdated
@@ -1835,6 +1835,12 @@ | |||
data_type : x | |||
optional : boxes_num | |||
|
|||
- backward_op : pull_sparse_v2_grad | |||
forward : pull_sparse_v2 (Tensor[] ids, Tensor[] w, int embedding_dim = 11, int table_id = 0, str accessor_class = "", str ctrlabel_name = "", int padding_id = 0, bool scale_sparse_grad = true, str[] input_names = {}, bool is_distributed = true) -> Tensor[](out) | |||
args : (Tensor[] ids, Tensor[] w, Tensor[] out_grad, int embedding_dim, int table_id, str accessor_class, str ctrlabel_name, int padding_id, bool scale_sparse_grad, str[] input_names, bool is_distributed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
args : (Tensor[] ids, Tensor[] w, Tensor[] out_grad, int embedding_dim, int table_id, str accessor_class, str ctrlabel_name, int padding_id, bool scale_sparse_grad, str[] input_names, bool is_distributed) | |
args : (Tensor[] ids, Tensor[] w, Tensor[] out_grad, int embedding_dim = 11, int table_id = 0, str accessor_class = "", str ctrlabel_name = "", int padding_id = 0, bool scale_sparse_grad = true, str[] input_names = {}, bool is_distributed = true) |
现在的报错是这里造成的,需要设置一下默认值,否则python脚本就用None填充了。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
感谢~已修改
现在的报错是因为out的 |
4641b5f
to
1b49103
Compare
多谢,目前已经rebase后重新rerun了 |
* feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2
* feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2
* feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2 * feat(pir): reg pull_sparse_v2
PR Category
Execute Infrastructure
PR Types
Devs
Description
#60436
注册算子pull_sparse_v2