Updating inference graph absent node locking
AssigneeMicro Focus LLC
InventorsFei Chen, Nandish Jayaram, Maria Teresa Gonzalez Diaz, Krishnamurthy Viswanathan
Life of this patent
Estimating the term…
Abstract
Example implementations relate to updating an inference graph absent node locking. For example, a processor executing a first thread may receive a first task for updating a node of an inference graph stored by a storage device accessible to a second thread, the first task being assigned during a first iteration of a graph update loop. Absent locking the node from access by the second thread, the processor may generate a value for the node and update the node with the value. Based on detecting that each node of the inference graph has been updated, the processor may continue with a second iteration of the graph update loop.
Claims19
A method comprising:
- receiving, by a processor executing a first thread, a first task for updating a first node of a plurality of nodes of an inference graph stored by a storage device, wherein a second thread has a first lock-free access to the inference graph during a first iteration of a graph update loop in which a graph inference algorithm is applied to update the plurality of nodes, the first task being assigned to the first thread for the first iteration, and a second task for updating a second node of the plurality of nodes being assigned to the second thread during the first iteration;
- while the second thread has the first lock-free access to the inference graph during the first iteration:
- generating, by the processor, a first value for the first node;
- and
- updating, by the processor, the first node with the first value;
- the processor ceasing the execution of the first thread in response to the execution of the first thread reaching a first barrier;
- and
- in response to the execution of the first thread reaching the first barrier and an execution of the second thread reaching a second barrier, continuing with a second iteration of the graph update loop.
A device comprising:
- at least one processor, wherein the at least one processor comprises a first processor to execute a first thread;
- and
- a machine-readable storage device comprising instructions that, when executed by the at least one processor, cause the at least one processor to:
- receive a first task for updating a first node of a plurality of nodes of an inference graph stored by a storage device, wherein a second thread has a lock-free access to the inference graph during a first iteration of a graph update loop in which a graph inference algorithm is applied to update the plurality of nodes, the first task being assigned to the first thread for the first iteration, and a second task for updating a second node of the plurality of nodes being assigned to the second thread during the first iteration;
- while the second thread has the lock-free access to the inference graph during the first iteration:
- generate a first value for the first node;
- and
- update the first node with the first value;
- cease the execution of the first thread in response to the execution of the first thread reaching a first barrier;
- and
- in response to the execution of the first thread reaching the first barrier and an execution of the second thread reaching a second barrier, continue with a second iteration of the graph update loop.
A machine-readable storage device comprising instructions that, when executed, cause a first processor to:
- receive a first task list, wherein the first task list is associated with a first iteration to update a plurality of nodes of an inference graph, tasks in the first task list correspond to a subset of nodes of the plurality of nodes, and values of the subset of nodes being stored in a shared data structure;
- process the first task list based on updating the values of the subset of nodes, wherein the shared data structure is accessible to a second processor other than the first processor by a thread executing on the second processor, and processing the first task list comprises the first processor accessing the shared data structure while the second processor has a lock-free access to the shared data structure;
- and
- after processing the first task list, wait for the thread executing on the second processor to finish execution of a second task list associated with the first iteration before executing tasks associated with updating the plurality of nodes in a second iteration.
Dependencies are inferred from the claim text.