diff --git a/paddle/fluid/operators/nce_op.cc b/paddle/fluid/operators/nce_op.cc index c9c4d1a4c74f33021fe3c774f3a91c5abaee6616..dd093729d1913badf7d72e632956e569dd78d107 100644 --- a/paddle/fluid/operators/nce_op.cc +++ b/paddle/fluid/operators/nce_op.cc @@ -207,34 +207,6 @@ class NCEOpMaker : public framework::OpProtoAndCheckerMaker { // for parameter prefetch AddAttr("remote_prefetch", "").SetDefault(false); - AddAttr("trainer_id", "trainer id from 0 ~ worker_num.") - .SetDefault(0) - .AsExtra(); - AddAttr>("height_sections", - "Height for each output SelectedRows.") - .SetDefault(std::vector({})) - .AsExtra(); - AddAttr>( - "epmap", - "(string vector, default 127.0.0.1:6164)" - "Server endpoints in the order of input variables for mapping") - .SetDefault({}) - .AsExtra(); - AddAttr>( - "table_names", - "(string vector, the split table names that will be fetched from " - "parameter server)" - "in the order of input variables for mapping") - .SetDefault({}) - .AsExtra(); - - AddAttr>("custom_neg_classes", - "This attribute only be used in unitest. Classes " - "in this list wiil be used as negative classes " - "for every samples. Under normal conditions, " - "user should avoid setting this attribute.") - .SetDefault({}) - .AsExtra(); AddAttr("is_test", "(bool, default false) Set to true for inference " "only, false for training.") diff --git a/paddle/fluid/operators/pscore/distributed_push_sparse_op.cc b/paddle/fluid/operators/pscore/distributed_push_sparse_op.cc index 840e33939897fd04d8298e8af08b47028529e080..a2bf63da10bd2ff85ab2347b6999c13e956789d1 100644 --- a/paddle/fluid/operators/pscore/distributed_push_sparse_op.cc +++ b/paddle/fluid/operators/pscore/distributed_push_sparse_op.cc @@ -113,11 +113,6 @@ class DistributedPushSparseOpMaker : public framework::OpProtoAndCheckerMaker { AddAttr("use_cvm_op", "(boolean, default false) Use cvm op or not.") .SetDefault(false); - AddAttr>("slots", - "[slot_id1, slot_id2] Slots array of Ids.") - .SetDefault({}) - .AsExtra(); - AddComment(R"DOC( Lookup Tablel Prefetch Operator. This operator is used to perform lookup on parameter W, diff --git a/paddle/phi/api/yaml/op_compat.yaml b/paddle/phi/api/yaml/op_compat.yaml index 7d5311b0799c0cac7f65b97407fca2cb4ef50a5c..a75c38b951a47585e0508888c27e792745f8e158 100644 --- a/paddle/phi/api/yaml/op_compat.yaml +++ b/paddle/phi/api/yaml/op_compat.yaml @@ -208,6 +208,10 @@ outputs : out : Out +- op : distributed_push_sparse + extra : + attrs : ['int[] slots = {}'] + - op : divide (elementwise_div) backward : divide_grad (elementwise_div) extra : @@ -485,6 +489,12 @@ outputs : out : Out +- op : nce + backward : nce_grad + extra : + attrs : [int trainer_id = 0, 'int64_t[] height_sections = {}', 'str[] epmap = {}', + 'str[] table_names = {}', 'int[] custom_neg_classes = {}'] + - op : nearest_interp (nearest_interp_v2) backward : nearest_interp_grad (nearest_interp_v2_grad) extra :