MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / ProcessArgs

Method ProcessArgs

tensorflow/js/ops/ts_op_gen.cc:107–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107void GenTypeScriptOp::ProcessArgs() {
108 for (int i = 0; i < api_def_.arg_order_size(); i++) {
109 auto op_def_arg = FindInputArg(api_def_.arg_order(i), op_def_);
110 if (op_def_arg == nullptr) {
111 LOG(WARNING) << "Could not find OpDef::ArgDef for "
112 << api_def_.arg_order(i);
113 continue;
114 }
115 auto api_def_arg = FindInputArg(api_def_.arg_order(i), api_def_);
116 if (api_def_arg == nullptr) {
117 LOG(WARNING) << "Could not find ApiDef::Arg for "
118 << api_def_.arg_order(i);
119 continue;
120 }
121
122 // Map attr names to arg indexes:
123 if (!op_def_arg->type_attr().empty()) {
124 AddAttrForArg(op_def_arg->type_attr(), i);
125 } else if (!op_def_arg->type_list_attr().empty()) {
126 AddAttrForArg(op_def_arg->type_list_attr(), i);
127 }
128 if (!op_def_arg->number_attr().empty()) {
129 AddAttrForArg(op_def_arg->number_attr(), i);
130 }
131
132 input_op_args_.push_back(ArgDefs(*op_def_arg, *api_def_arg));
133 }
134
135 num_outputs_ = api_def_.out_arg_size();
136}
137
138void GenTypeScriptOp::ProcessAttrs() {
139 for (int i = 0; i < op_def_.attr_size(); i++) {

Callers

nothing calls this directly

Calls 4

FindInputArgFunction · 0.85
ArgDefsClass · 0.85
emptyMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected