@@ -81,10 +81,12 @@ class LookupTableV2OpMaker : public framework::OpProtoAndCheckerMaker {
8181 AddAttr<bool >(" is_sparse" ,
8282 " (boolean, default false) "
8383 " Sparse update." )
84- .SetDefault (false );
84+ .SetDefault (false )
85+ .AsExtra ();
8586 AddAttr<bool >(" is_distributed" ,
8687 " (boolean, default false) distributed lookup table." )
87- .SetDefault (false );
88+ .SetDefault (false )
89+ .AsExtra ();
8890 AddAttr<int64_t >(" padding_idx" ,
8991 " (int64, default -1) "
9092 " If the value is -1, it makes no effect to lookup. "
@@ -93,22 +95,27 @@ class LookupTableV2OpMaker : public framework::OpProtoAndCheckerMaker {
9395 .SetDefault (kNoPadding );
9496
9597 // for parameter prefetch
96- AddAttr<bool >(" remote_prefetch" , " " ).SetDefault (false );
97- AddAttr<int >(" trainer_id" , " trainer id from 0 ~ worker_num." ).SetDefault (0 );
98+ AddAttr<bool >(" remote_prefetch" , " " ).SetDefault (false ).AsExtra ();
99+ AddAttr<int >(" trainer_id" , " trainer id from 0 ~ worker_num." )
100+ .SetDefault (0 )
101+ .AsExtra ();
98102 AddAttr<std::vector<int64_t >>(" height_sections" ,
99103 " Height for each output SelectedRows." )
100- .SetDefault (std::vector<int64_t >({}));
104+ .SetDefault (std::vector<int64_t >({}))
105+ .AsExtra ();
101106 AddAttr<std::vector<std::string>>(
102107 " epmap" ,
103108 " (string vector, default 127.0.0.1:6164)"
104109 " Server endpoints in the order of input variables for mapping" )
105- .SetDefault ({});
110+ .SetDefault ({})
111+ .AsExtra ();
106112 AddAttr<std::vector<std::string>>(
107113 " table_names" ,
108114 " (string vector, the split table names that will be fetched from "
109115 " parameter server)"
110116 " in the order of input variables for mapping" )
111- .SetDefault ({});
117+ .SetDefault ({})
118+ .AsExtra ();
112119
113120 AddComment (R"DOC(
114121Lookup Table V2 Operator.
0 commit comments