Patent ID: 11960866
Assignee: HUAWEI TECHNOLOGIES CO., LTD.
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 5:
6. The method of claim 5, further comprising:
(a) determining whether the collected nodes data structure is empty;
responsive to determining that the collected nodes data structure is not empty:
selecting a node from the collected nodes data structure in an order that guarantees all nodes are selected once before any node is selected a second time;
responsive to determining that the node is a Merge node, extracting a corresponding TensorFlow graph branch;
responsive to determining that the corresponding TensorFlow graph branch is valid, constructing the common intermediate representation branch corresponding to the corresponding TensorFlow graph branch;
storing the common intermediate representation branch in the extracted control flows data structure;
removing the Merge node from the collected nodes data structure;
returning to (a);
responsive to determining that the corresponding TensorFlow graph branch is not valid, returning to (a);
responsive to determining that the node is a Loop condition node:
extracting a corresponding TensorFlow graph loop predicate and bodies;
responsive to determining that the corresponding TensorFlow graph loop predicate and bodies are valid:

constructing the common intermediate representation loop corresponding the TensorFlow graph loop;
storing the common intermediate representation loop in the extracted control flows data structure;
removing the Loop condition node from the collected nodes data structure;
returning to (a); and
responsive to determining that the corresponding TensorFlow graph loop predicate and bodies are not valid, returning to (a).