# US 2024/0256350 A1 · Hardware accelerator for computing an algebraic function

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2024/0256350 A1
- Document ID: US20240256350A1
- Status: Published application
- Kind: A1
- Application number: 18/103,087
- Filed: 2023-01-30
- Published: 2024-08-01
- Earliest claimed: 2023-01-30
- Assignees: Ingonyama Ltd.
- Applicants: Ingonyama Ltd.
- Inventors: Michael ASA; Omer SHLOMOVITS; Daniel SHTERMAN; Yuval DOMB
- Web page: https://patentgrep.com/patent/US20240256350A1

## CPC

- G06F 9/5044: {considering hardware capabilities}
- G06F 7/722: {Modular multiplication (G06F7/724, G06F7/727, G06F7/728 take precedence)}
- G06F 9/3001: {Arithmetic instructions}
- G06F 9/4881: {Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues}
- G06F 9/5016: {the resource being the memory}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A multi-thread processor computes a function requiring only modular additions and multiplications. Memories store constants, multi-bit elements, and multiple instruction sets. A multiplier receives first and second multiplier operands, generates their product, which is fed to an adder as a first operand and added to a second adder operand, the sum being stored in an accumulator memory. Each instruction set is executed on a successive clock, and includes instructions for defining respective addresses in the memories from which constants, elements and sums are to be accessed. A scheduler maintains a schedule of threads executable by the processor in parallel, and is configured on each successive clock to cycle through the threads and initiate a first available thread. Selectors responsive to instructions received from the program memory select the required multiplier and adder operands. A multi-core system executes multiple parallel threads on multiple processors allowing complex functions to be computed efficiently.

## Claims

### Claim 1

A multi-thread processor for computing a function requiring only modular multiplications and modular additions, the processor comprising:
a constants memory for storing a plurality of constants,
a data memory for storing a plurality of multi-bit elements,
a multiplier having a pair of inputs each for receiving respective first and second multiplier operands and producing a product of the first and second multiplier operands at an output of the multiplier,
an adder having a pair of inputs each for receiving respective first and second adder operands and producing a sum of the first and second adder operands at an output of the adder, wherein the product of the first and second multiplier operands serves as the first adder operand,
an accumulator memory having an input coupled to the output of the adder for storing a sum of the adder operands, and
a program memory storing multiple instruction sets, each for execution on a successive clock, and each instruction set including instructions for defining respective addresses in said memories from which constants, elements and sums are to be accessed,
a scheduler coupled to the program memory and configured to maintain a schedule of multiple threads executable by the processor in parallel, said schedule indicating for each of said threads whether the thread is available or idle, and the scheduler being configured on each successive clock to cycle through the threads and initiate a first available thread,
a first selector responsive to instructions received from the program memory for selecting as the first multiplier operand for each thread a specified element from the data memory or the product of the first and second multiplier operands,
a second selector responsive to instructions received from the program memory for selecting as the second multiplier operand for each thread a specified element from the data memory or a constant accessed from the constants memory or the product of the first and second multiplier operands, and
a third selector responsive to instructions received from the program memory for selecting as the second adder operand for each thread either a sum stored in the accumulator memory or a constant stored in the constants memory.

### Claim 2 (depends on 1)

The processor according to claim 1, being configured to compute X2y+z+c, where x is an element stored in the data memory, c is a constant stored in the constants memory, y is a natural number such that y≥0 and z∈(0, 1), the processor executing instructions to:
(a) convey the element x from the data memory to the multiplier as both the first and second multiplier operands;
(b) if y>1 wait for the multiplier to complete the computation and recycle the multiplier output to both inputs of the multiplier as the first and second multiplier operands and repeat for a further y−1 cycles;
(c) if z=1 wait for the multiplier to complete the computation and convey the element x to the multiplier and recycle the multiplier output to the multiplier as the first and second multiplier operands, respectively; and
(d) wait for the multiplier to complete the computation and convey the output from the multiplier together with the constant c from the constants memory as the first and second adder operands, respectively.

### Claim 3 (depends on 1)

The processor according to claim 1, being configured to compute yj=Σ(xi×cj,i) where xi is an element stored in the data memory, yj is the result of the computation, cj,i is a constant stored in the constants memory, and i, j are natural numbers, the processor executing instructions to:
(a) convey the element xi from the data memory as the first multiplier operand to the multiplier;
(b) convey the constant cj,i from the constants memory as the second multiplier operand to the multiplier;
(c) wait for the multiplier to complete the computation and convey the output from the multiplier as the first adder operand to the adder;
(d) convey the partial sum yj from the accumulator memory as the second adder operand to the adder;
(e) wait for the adder to complete the computation and write the output from the adder to the accumulator memory as a new partial sum yj;
(f) repeat (a) to (e) as required.

### Claim 4 (depends on 1)

The processor according to claim 1, being configured to compute yi=(x0×ci)+xi where xi is an element stored in the data memory, yi is the result of the computation, ci is a constant stored in the constants memory, i is a natural number (i≥1), the processor executing instructions to:
(a) convey the element x0 from the data memory as the first multiplier operand to the multiplier;
(b) convey the constant ci from the constants memory as the second multiplier operand to the multiplier;
(c) wait for the multiplier to complete the computation and convey the output from the multiplier as the first adder operand to the adder together with the element yi;
(d) wait for the adder to complete the computation and write the output from the adder to the accumulator memory as yi;
(e) repeat (a) to (d) as required.

### Claim 5 (depends on 1)

The processor according to claim 1, wherein at least two of the program memory, the constants memory, and the data memory are implemented by a common memory having separately addressable partitions for storing program instructions, adder constants and multiplier constants.

### Claim 6 (depends on 1)

A core comprising:
at least one processor according to claim 1, and
a ring node configured to convey an element in the data memory to the corresponding data memory in another processor in said core or to the corresponding data memory in another processor in another like core.

### Claim 7 (depends on 6)

The core according to claim 6, wherein the ring node includes a register for storing one or more elements in a queue each of said elements being conveyed in turn from the register to the data memory at a location thereof in a namespace of an available thread.

### Claim 8 (depends on 6)

The core according to claim 6, having at least two processors which share at least one of the program memory, the constants memory, the data memory and the accumulator memory.

### Claim 9 (depends on 6)

A system comprising:
at least two cores according to claim 6 coupled in a ring,
a host interface connected in said ring and configured to convey data to a specified one of the cores along the respective ring nodes of all interconnecting cores,
a computer configured to run a software application that requires computation of the function for which each constituent processor is intended and which is configured to convey elements to the data memory via direct memory access.

### Claim 10 (depends on 9)

The system according to claim 9, wherein the function is a hash function and the processor is configured to:
(a) compute xi2y+z+ci where xi is an element stored in the data memory, ci is a constant stored in the constants memory, y is a natural number such that y≥0 and z∈(0,1),
(b) multiply the result of (a) by a full matrix by successive computations of yj=Σ(xi×cj,i) where xi is an element stored in the data memory, yj is the result of the computation, cj,i is a constant stored in the constants memory, i, j are natural numbers;
(c) repeat (a) and (b) for a specified number of cycles;
(d) multiply the result of (c) by a sparse matrix by successive computations of yi=(x0×cj,i)+xi where xi is an element stored in the data memory, yi is the result of the computation, cj,i is a constant stored in the constants memory, and i, j are natural numbers (i≥1);
(e) repeat (d) for a specified number of cycles;
(f) repeat (a) to (c) on the result of (e); and
(g) output the value of xi for a designated value of i as the result of the hash function;
wherein:
for each computation of (a) the processor executes instructions to:
i) convey the element xi from the data memory to the multiplier as both the first and second multiplier operands;
ii) if y>1 wait for the multiplier to complete the computation and recycle the multiplier output to both inputs of the multiplier as the first and second multiplier operands and repeat for a further y−1 cycles;
iii) if z=1 wait for the multiplier to complete the computation and convey the element xi to the multiplier and recycle the multiplier output to the multiplier as the first and second multiplier operands, respectively; and
iv) wait for the multiplier to complete the computation and convey the output from the multiplier together with the constant cj,i from the constants memory as the first and second adder operands, respectively;
for each computation of (b) the processor executes instructions to:
v) convey the element xi from the data memory as the first multiplier operand to the multiplier;
vi) convey the constant cj,i from the constants memory as the second multiplier operand to the multiplier;
vii) wait for the multiplier to complete the computation and convey the output from the multiplier as the first adder operand to the adder;
viii) convey the partial sum yj from the accumulator memory as the second adder operand to the adder;
ix) wait for the adder to complete the computation and write the output from the adder to the accumulator memory as a new partial sum yj;
x) repeat (v) to (ix) as required; and
for each computation of (d) the processor executes instructions to:
xi) convey the element x0 from the data memory as the first multiplier operand to the multiplier;
xii) convey the constant cj,i from the constants memory as the second multiplier operand to the multiplier;
xiii) wait for the multiplier to complete the computation and convey the output from the multiplier as the first adder operand to the adder together with the element yi;
xiv) wait for the adder to complete the computation and write the output from the adder to the accumulator memory; and
xv) repeat (xi) to (xiv) as required.

### Claim 11 (depends on 9)

The system according to claim 9, wherein the corresponding ring node coupled to each of a specified number, λ, of processors is configured to:
(j) direct the corresponding result xi of the hash function determined by each of said processors from an input of the same number λ of elements or hash results to a designated processor in the system for computing the result x′i of the hash function for the specified number λ of elements or results xi, and
(k) repeat (h) as required in respect of further hash results until only a single hash result is left.

### Claim 12 (depends on 10)

The system according to claim 10, wherein multiple processors are configured for computing in parallel the result xi of the hash function of the specified number λ of elements or hash results for multiple elements and hash functions.

### Claim 13 (depends on 11)

The system according to claim 11, wherein:
each element is identified by a respective ID equal to an original element ID Mod λ, and
each hash result is identified by a respective Hash ID equal to an original Hash ID/λ.

### Claim 14 (depends on 9)

The system according to claim 9, wherein at least two of the respective program memory, the constants memory, and the data memory of at least one processor in one core of the system are implemented by a common memory having separately addressable partitions for storing program instructions, adder constants and multiplier constants.

### Claim 15 (depends on 9)

The system according to claim 9, wherein at least one of the program memory, the constants memory, the data memory and the accumulator memory in at least one core of the system is shared by more than one processor in said at least one core.
