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

Function ParseControlFlowErrors

tensorflow/lite/toco/tflite/export.cc:437–460  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

435}
436
437void ParseControlFlowErrors(std::set<string>* custom_ops,
438 std::vector<string>* error_msgs) {
439 std::set<string> unsupported_control_flow_ops;
440 // Check if unsupported ops contains control flow ops. It's impossible
441 // to implement these ops as custom ops at the moment.
442 for (const auto& op : *custom_ops) {
443 if (IsControlFlowOp(op)) {
444 unsupported_control_flow_ops.insert(op);
445 }
446 }
447 if (!unsupported_control_flow_ops.empty()) {
448 error_msgs->push_back(absl::StrCat(
449 "TensorFlow Lite currently doesn't support control flow ops: ",
450 absl::StrJoin(unsupported_control_flow_ops, ", "), ".",
451 " We are working on supporting control flow ops, please see github "
452 "issue at "
453 "https://github.com/tensorflow/tensorflow/issues/28485."));
454 }
455 // Remove control flow ops from `custom_ops` set so that they won't be
456 // reported again in later messages.
457 for (const auto& op : unsupported_control_flow_ops) {
458 custom_ops->erase(op);
459 }
460}
461
462// Exports a string buffer that contains the model's minimum required runtime
463// version.

Callers 1

ExportFunction · 0.85

Calls 6

IsControlFlowOpFunction · 0.85
StrCatFunction · 0.50
insertMethod · 0.45
emptyMethod · 0.45
push_backMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected