IP Library Granted Patent US 12,321,855
Granted Patent B2
US 12,321,855 · App. 17/221,469 · Granted Jun 3, 2025

Graph execution using access request response dynamic batch assembly

Inventors: Ljubisa Bajic (Toronto, CA); Davor Capalija (Toronto, CA); Ivan Matosevic (Toronto, CA); Alex Cejkov (Toronto, CA)
Assignee: Tenstorrent AI ULC
G06N3/08G06F9/3877G06F9/4843G06F9/5066G06F18/29G06N5/04G06F2209/5019G06F2209/502
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,321,855
App. No.
17/221,469
Granted
Jun 3, 2025
Kind
B2
Abstract

Methods and systems for the accelerated execution of a directed graph are disclosed. The execution can involve the generation of an inference from a set of inputs provided to an artificial neural network. In a specific example, a method for executing a directed graph includes receiving at least two batches of indices. The batches of indices, when used to access a set of embeddings, provide at least two batches of embedding outputs and execute a layer of the directed graph. The method further includes accessing the set of embeddings using the at least two batches of indices. The method further includes rearranging, based on a set of latencies for the accessing step, the at least two batches of embedding outputs into at least two batches of rearranged embeddings. The method further includes providing the at least two batches of rearranged embeddings to a subsequent layer of the directed graph.

Claims (88)

1. A method for executing a directed graph, wherein each step is conducted by at least one processor, comprising:

receiving at least two batches of indices including a first batch and a second batch, wherein the at least two batches of indices, when used to access a set of embeddings: (i) provide at least two batches of embedding outputs which correspond to the at least two batches of indices; and (ii) execute a layer of the directed graph, wherein each index of the first batch is applied to the layer of the directed graph prior to each index of the second batch being applied to the layer of the directed graph;

accessing the set of embeddings using the at least two batches of indices;

rearranging, based on a set of latencies for the accessing step, the at least two batches of embedding outputs into at least two batches of rearranged embedding outputs including a first rearranged batch and a second rearranged batch; and

providing the at least two batches of rearranged embedding outputs to a subsequent layer of the directed graph, wherein the first rearranged batch is entirely provided to the subsequent layer of the directed graph before the second rearranged batch is provided to the subsequent layer of the directed graph.

2. The method of claim 1 , wherein:

the accessing of the set of embeddings, using the at least two batches of indices executes the layer of the directed graph a number of times equal to a number of batches in the at least two batches of indices; and

the providing of the at least two batches of rearranged embedding outputs to the subsequent layer of the directed graph is conducted as part of the execution of the directed graph the number of times.

3. The method of claim 1 , wherein:

the rearranging is based on the set of latencies in that the batches of rearranged embedding outputs are formed dynamically as individual entries in the set of embedding are accessed.

4. The method of claim 1 , wherein:

the directed graph is executed using a network of computational nodes;

the at least one processor comprises at least one computational node in the network of computational nodes;

the rearranging step is conducted by a first computational node in the network of computational nodes;

the accessing step includes providing the rearranged embedding outputs to the first computational node;

the set of latencies of the accessing step include a set of times for which the first computational node is waiting for the set of embedding outputs; and

the rearranging is based on the set of latencies in that the batches of rearranged embedding outputs are formed dynamically as individual entries in the set of embedding outputs are provided to the first computational node.

5. The method of claim 1 , wherein:

the rearranging is based on the set of latencies using estimates of the latencies; and

the estimates of the latencies are stored prior to the accessing the set of embeddings step.

6. The method of claim 1 , wherein:

the directed graph is a deep learning recommendation engine;

the first batch in the at least two batches of indices includes at least two user-specific sets of indices;

the subsequent layer of the directed graph is a neural network layer in the deep learning recommendation engine;

the second batch in the at least two batches of rearranged embedding outputs includes at least two user-specific sets of embeddings; and

a first set of users represented by the first batch is not the same as a second set of users represented by the second batch.

7. The method of claim 1 , wherein:

the batches in the at least two batches of indices include at least two inference-specific sets of indices;

the batches in the at least two batches of rearranged embedding outputs include at least two inference-specific sets of embeddings; and

a first set of inferences generated from the at least two inference-specific sets of indices is not equal to a second set of inferences generated from the at least two inference-specific sets of embeddings.

8. The method of claim 1 , further comprising:

receiving at least two batches of inferences from an output layer of the directed graph in response to the providing of the at least two batches of rearranged embedding outputs to the subsequent layer of the directed graph; and

rearranging the at least two batches of inferences, based on an original composition of the at least two batches of indices, into at least two batches of rearranged inferences.

9. The method of claim 1 , wherein:

the directed graph is executed using a network of computational nodes;

the network of computational nodes includes a first computational node and a second computational node;

the at least two batches of indices are received at the first computational node;

the rearranging step is conducted by the first computational node; and

the accessing of the set of embeddings step is conducted using the first computational node and the second computational node.

10. The method of claim 9 , wherein:

the network of computational nodes is a network on chip for a multicore processor; and

the computational nodes in the network of computational nodes are processor cores in the multicore processor.

11. The method of claim 10 , wherein:

the first computational node is an embedding look up orchestrator core;

the providing and receiving steps are conducted by the first computational node using the network on chip; and

the second computational node is an embedding cache core which stores embedding outputs in association with indices.

12. The method of claim 1 , further comprising:

receiving at least two batches of inferences from an output layer of the directed graph in response to the providing of the at least two batches of rearranged embedding outputs to the subsequent layer of the directed graph;

wherein the directed graph is executed using a network of computational nodes;

wherein the at least two batches of indices are received at a first computational node in the network of computational nodes;

wherein the rearranging step and the receiving of the at least two batches of inferences step are conducted by the first computational node in the network of computational nodes; and

providing the at least two batches of inferences from the first computational node in the network of computational nodes to a different computational node in the network of computational nodes.

13. The method of claim 1 , further comprising:

receiving at least two batches of inferences from an output layer of the directed graph in response to the providing of the at least two batches of rearranged embedding outputs to the subsequent layer of the directed graph;

rearranging the at least two batches of inferences, based on an original composition of the at least two batches of indices, into at least two batches of rearranged inferences;

wherein the directed graph is executed using a network of computational nodes;

wherein the accessing of the set of embeddings step is conducted at least partly using a second computational node in the network of computational nodes; and

providing the at least two batches of rearranged inferences from a first computational node to a third computational node in the network of computational nodes.

14. A system for executing a directed graph comprising:

a network of computational nodes;

a first computational node in the network of computational nodes;

a second computational node in the network of computational; and

non-transitory computer readable media, in the network of computational nodes, storing instructions which, when executed by the network of computational nodes, cause: (i) the first computational node to receive at least two batches of indices including a first batch and a second batch, wherein the at least two batches of indices, when used to access a set of embeddings: provide at least two batches of embedding outputs which correspond to the at least two batches of indices; and execute a layer of the directed graph, wherein each index of the first batch is applied to the layer of the directed graph prior to each index of the second batch being applied to the layer of the directed graph; (ii) the first computational node and the second computational node to cooperatively access the set of embeddings using the at least two batches of indices; (iii) the first computational node to rearrange, based on a set of latencies for the accessing step, the at least two batches of embedding outputs into at least two batches of rearranged embedding outputs including a first rearranged batch and a second rearranged batch; and (iv) the first computational node to provide the at least two batches of rearranged embedding outputs to a subsequent layer of the directed graph, wherein the first rearranged batch is entirely provided to the subsequent layer of the directed graph before the second rearranged batch is provided to the subsequent layer of the directed graph.

15. The system of claim 14 , wherein:

the rearranging is based on the set of latencies in that the batches of rearranged embedding outputs are formed dynamically as individual entries in the batches of embedding outputs are provided by the network of computational nodes to the first computational node.

16. The system of claim 14 , wherein:

the batches in the at least two batches of indices include at least two inference-specific sets of indices;

the batches in the at least two batches of rearranged embedding outputs include at least two inference-specific sets of embeddings; and

a first set of inferences generated from the at least two inference-specific sets of indices is not equal to a second set of inferences generated from the at least two inference-specific sets of embeddings.

17. The system of claim 14 , wherein:

the network of computational nodes is a network on chip for a multicore processor; and

the computational nodes in the network of computational nodes are processor cores in the multicore processor.

18. The system of claim 14 , wherein:

the first computational node is an embedding look up orchestrator core;

the providing and receiving steps are conducted by the first computational node using the network on chip; and

the second computational node is an embedding cache core which stores embeddings in association with indices.

19. A computer-implemented method for executing a directed graph comprising:

receiving at least two batches of indices including a first batch and a second batch, wherein the at least two batches of indices, when used to access a set of embeddings: (i) provide at least two batches of embedding outputs which correspond to the at least two batches of indices; and (ii) execute a layer of the directed graph, wherein each index of the first batch is applied to the layer of the directed graph prior to each index of the second batch being applied to the layer of the directed graph;

accessing the set of embeddings, using the at least two batches of indices, wherein accessing the set of embeddings includes individually providing a sequence of embedding outputs from a memory to a computational node;

rearranging, based on the sequence of embedding outputs, the at least two batches of embedding outputs into at least two batches of rearranged embedding outputs including a first rearranged batch and a second rearranged batch; and

providing the at least two batches of rearranged embedding outputs to a subsequent layer of the directed graph, wherein the first rearranged batch is entirely provided to the subsequent layer of the directed graph before the second rearranged batch is provided to the subsequent layer of the directed graph.

20. The computer-implemented method of claim 19 , wherein:

the accessing of the set of embeddings, using the at least two batches of indices executes the layer of the directed graph a number of times equal to a number of batches in the at least two batches of indices; and

the providing of the at least two batches of rearranged embedding outputs to the subsequent layer of the directed graph is conducted as part of the execution of the directed graph the number of times.

21. The computer-implemented method of claim 19 , wherein:

the batches in the at least two batches of indices include at least two inference-specific sets of indices;

the batches in the at least two batches of rearranged embedding outputs include at least two inference-specific sets of embeddings; and

a first set of inferences generated from the at least two inference-specific sets of indices is not equal to a second set of inferences represented by the at least two inference-specific sets of embeddings.

Assignments (3)
CHANGE OF NAME Recorded Feb 23, 2025
From: TENSTORRENT INC.
To: TENSTORRENT AI INC.
Reel/Frame 070298/0922 →
CHANGE OF NAME Recorded Feb 23, 2025
From: TENSTORRENT AI INC.
To: TENSTORRENT AI ULC
Reel/Frame 070298/0944 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 2, 2021
From: BAJIC, LJUBISA; CAPALIJA, DAVOR; MATOSEVIC, IVAN; CEJKOV, ALEX
To: TENSTORRENT INC.
Reel/Frame 055811/0470 →
Continuity (1)
Related Publication 20220318614A1 · Oct 6, 2022
References Cited (9)
US 20190073580A1 · Dzhulgakov et al. · 2019 [cited by applicant]
US 20200234126A1 · Covell et al. · 2020 [cited by applicant]
Extended European Search Report from EP Application No. 22166213.3 dated Oct. 17, 2022, 13 pages. [cited by applicant]
Ranggi Hwang et al: “Centaur: A Chiplet-based, Hybrid Sparse-Dense Accelerator for Personalized Recommendations”. [cited by applicant]
Gupta et al., “DeepRecSys: A System for Optimizing End-To-End At-scale Neural Recommendation Inference”, arXiv:2001.02772, 14 pages. [cited by applicant]
Ke et al., “RecNMP: Accelerating Personalized Recommendation with Near-Memory Processing”, arXiv:1912.12953, 14 pages. [cited by applicant]
Maxim Naumov, “On the Dimensionality of Embeddings for Sparse Features and Data”, arXiv:1901.02103v1 [cs.LG], Jan. 7, 2019, 8 pages. [cited by applicant]
Maxim Naumov, et al., “Deep Learning Recommendation Model for Personalization and Recommendation Systems”, arXiv:1906_00091v1 [cs.IR], May 31, 2019, 10 pages. [cited by applicant]
Oleksii Hrinchuk, et al., “Tensorized Embedding Layers”, arXiv:1901.10787v2 [cs.CL], Feb. 19, 2020, 13 pages. [cited by applicant]