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

Function WriteTSOps

tensorflow/js/ops/ts_op_gen.cc:265–288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263} // namespace
264
265void WriteTSOps(const OpList& ops, const ApiDefMap& api_def_map,
266 const string& ts_filename) {
267 Env* env = Env::Default();
268
269 std::unique_ptr<WritableFile> ts_file = nullptr;
270 TF_CHECK_OK(env->NewWritableFile(ts_filename, &ts_file));
271
272 StartFile(ts_file.get());
273
274 for (const auto& op_def : ops.op()) {
275 // Skip deprecated ops
276 if (op_def.has_deprecation() &&
277 op_def.deprecation().version() <= TF_GRAPH_DEF_VERSION) {
278 continue;
279 }
280
281 const auto* api_def = api_def_map.GetApiDef(op_def.name());
282 if (api_def->visibility() == ApiDef::VISIBLE) {
283 WriteTSOp(op_def, *api_def, ts_file.get());
284 }
285 }
286
287 TF_CHECK_OK(ts_file->Close());
288}
289
290} // namespace tensorflow

Callers 1

GenerateTsOpFileTextFunction · 0.85

Calls 10

DefaultFunction · 0.85
StartFileFunction · 0.85
WriteTSOpFunction · 0.85
GetApiDefMethod · 0.80
nameMethod · 0.65
NewWritableFileMethod · 0.45
getMethod · 0.45
opMethod · 0.45
versionMethod · 0.45
CloseMethod · 0.45

Tested by 1

GenerateTsOpFileTextFunction · 0.68