未验证 提交 4f847433 编写于 作者: Z zyfncg 提交者: GitHub

clear extra attrs of distribute op in opmaker (#46451)

上级 fbfd1402
...@@ -207,34 +207,6 @@ class NCEOpMaker : public framework::OpProtoAndCheckerMaker { ...@@ -207,34 +207,6 @@ class NCEOpMaker : public framework::OpProtoAndCheckerMaker {
// for parameter prefetch // for parameter prefetch
AddAttr<bool>("remote_prefetch", "").SetDefault(false); AddAttr<bool>("remote_prefetch", "").SetDefault(false);
AddAttr<int>("trainer_id", "trainer id from 0 ~ worker_num.")
.SetDefault(0)
.AsExtra();
AddAttr<std::vector<int64_t>>("height_sections",
"Height for each output SelectedRows.")
.SetDefault(std::vector<int64_t>({}))
.AsExtra();
AddAttr<std::vector<std::string>>(
"epmap",
"(string vector, default 127.0.0.1:6164)"
"Server endpoints in the order of input variables for mapping")
.SetDefault({})
.AsExtra();
AddAttr<std::vector<std::string>>(
"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<std::vector<int>>("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<bool>("is_test", AddAttr<bool>("is_test",
"(bool, default false) Set to true for inference " "(bool, default false) Set to true for inference "
"only, false for training.") "only, false for training.")
......
...@@ -113,11 +113,6 @@ class DistributedPushSparseOpMaker : public framework::OpProtoAndCheckerMaker { ...@@ -113,11 +113,6 @@ class DistributedPushSparseOpMaker : public framework::OpProtoAndCheckerMaker {
AddAttr<bool>("use_cvm_op", "(boolean, default false) Use cvm op or not.") AddAttr<bool>("use_cvm_op", "(boolean, default false) Use cvm op or not.")
.SetDefault(false); .SetDefault(false);
AddAttr<std::vector<int>>("slots",
"[slot_id1, slot_id2] Slots array of Ids.")
.SetDefault({})
.AsExtra();
AddComment(R"DOC( AddComment(R"DOC(
Lookup Tablel Prefetch Operator. Lookup Tablel Prefetch Operator.
This operator is used to perform lookup on parameter W, This operator is used to perform lookup on parameter W,
......
...@@ -208,6 +208,10 @@ ...@@ -208,6 +208,10 @@
outputs : outputs :
out : Out out : Out
- op : distributed_push_sparse
extra :
attrs : ['int[] slots = {}']
- op : divide (elementwise_div) - op : divide (elementwise_div)
backward : divide_grad (elementwise_div) backward : divide_grad (elementwise_div)
extra : extra :
...@@ -485,6 +489,12 @@ ...@@ -485,6 +489,12 @@
outputs : outputs :
out : Out 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) - op : nearest_interp (nearest_interp_v2)
backward : nearest_interp_grad (nearest_interp_v2_grad) backward : nearest_interp_grad (nearest_interp_v2_grad)
extra : extra :
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册